https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118277

ak at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu.org

--- Comment #4 from ak at gcc dot gnu.org ---
Most likely it's latent, asm constexpr just reuses the existing constexpr
machinery.

5271    static tree
5272    initialized_type (tree t)
5273    {
5274      if (TYPE_P (t))
5275        return t;
5276      tree type = TREE_TYPE (t);
5277      if (TREE_CODE (t) == CALL_EXPR)
5278        {
(rr)
5279          /* A constructor call has void type, so we need to look deeper. 
*/
5280          tree fn = get_function_named_in_call (t);
5281          if (fn && TREE_CODE (fn) == FUNCTION_DECL
5282              && DECL_CXX_CONSTRUCTOR_P (fn))
5283            type = DECL_CONTEXT (fn);
5284        }
5285      else if (TREE_CODE (t) == COMPOUND_EXPR)
5286        return initialized_type (TREE_OPERAND (t, 1));
5287      else if (TREE_CODE (t) == AGGR_INIT_EXPR)
5288        type = TREE_TYPE (AGGR_INIT_EXPR_SLOT (t));
(rr)
5289      return cv_unqualified (type);
5290    }

but t is an unexpected scope_ref with no type which is not handled:

(rr) pt t
 <scope_ref 0x7f672b7bd5f0 tree_0
    arg:0 <record_type 0x7f672b7bb540 to_str cxx-odr-p type_0 type_5 type_6
VOID
        align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f672b7bb1f8 context <translation_unit_decl 0x7f672b626000
../../tsrc/conste.cc>
        template-info <template_info 0x7f672b7bd528 template <template_decl
0x7f672b610cc0 to_str>
            args <tree_vec 0x7f672b7d2280 length:1
                elt:0 <template_parm_index 0x7f672b630090 type <integer_type
0x7f672b6285e8 int>
                    readonly constant decl <const_decl 0x7f672b60f7f8 rname>
                   index 0 level 1 orig_level 1>>>
        full-name "struct to_str<rname>"
        no-binfo use_template=1 interface-unknown
        chain <type_decl 0x7f672b636f00 to_str>>
    arg:1 <identifier_node 0x7f672b622fc0 value
        normal local bindings <(nil)>>
    ../../tsrc/conste.cc:5:23 start: ../../tsrc/conste.cc:5:23 finish:
../../tsrc/conste.cc:5:27>

Reply via email to