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

            Bug ID: 85518
           Summary: ICE mangling _FloatN types
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jsm28 at gcc dot gnu.org
  Target Milestone: ---

Compile the following C++ code on x86_64-linux-gnu (or most other platforms, I
expect).  This produces an ICE trying to mangle the _Float64 type - not
normally accessible from C++ code, but accessed via typeof applied to a
built-in function in this case.

Related to bug 85075 for powerpc.

typedef __typeof (__builtin_inff64 ()) _Float64;
void f (_Float64 x) {}

u.C:2:6: internal compiler error: in write_builtin_type, at cp/mangle.c:2605
 void f (_Float64 x) {}
      ^
0x79dc87 write_builtin_type
        /scratch/jmyers/glibc-bot/src/gcc/gcc/cp/mangle.c:2605
0x79dc87 write_type
        /scratch/jmyers/glibc-bot/src/gcc/gcc/cp/mangle.c:2202
0x7a01a4 write_method_parms
        /scratch/jmyers/glibc-bot/src/gcc/gcc/cp/mangle.c:2799
0x7a0466 write_bare_function_type
        /scratch/jmyers/glibc-bot/src/gcc/gcc/cp/mangle.c:2737
0x7a231f mangle_decl_string
        /scratch/jmyers/glibc-bot/src/gcc/gcc/cp/mangle.c:3795
0x7a2568 get_mangled_id
        /scratch/jmyers/glibc-bot/src/gcc/gcc/cp/mangle.c:3817
0x7a2568 mangle_decl(tree_node*)
        /scratch/jmyers/glibc-bot/src/gcc/gcc/cp/mangle.c:3855
0x111aaa5 decl_assembler_name(tree_node*)
        /scratch/jmyers/glibc-bot/src/gcc/gcc/tree.c:687
0x116c472 notice_global_symbol(tree_node*)
        /scratch/jmyers/glibc-bot/src/gcc/gcc/varasm.c:1668
0xa1252a cgraph_node::finalize_function(tree_node*, bool)
        /scratch/jmyers/glibc-bot/src/gcc/gcc/cgraphunit.c:452
0x89887f expand_or_defer_fn(tree_node*)
        /scratch/jmyers/glibc-bot/src/gcc/gcc/cp/semantics.c:4276
0x7fb6a5 cp_parser_function_definition_after_declarator
        /scratch/jmyers/glibc-bot/src/gcc/gcc/cp/parser.c:26873
0x7ff253 cp_parser_function_definition_from_specifiers_and_declarator
        /scratch/jmyers/glibc-bot/src/gcc/gcc/cp/parser.c:26785
0x7ff253 cp_parser_init_declarator
        /scratch/jmyers/glibc-bot/src/gcc/gcc/cp/parser.c:19522
0x800929 cp_parser_simple_declaration
        /scratch/jmyers/glibc-bot/src/gcc/gcc/cp/parser.c:13063
0x801828 cp_parser_block_declaration
        /scratch/jmyers/glibc-bot/src/gcc/gcc/cp/parser.c:12875
0x80d3d0 cp_parser_declaration
        /scratch/jmyers/glibc-bot/src/gcc/gcc/cp/parser.c:12772
0x80bde6 cp_parser_declaration_seq_opt
        /scratch/jmyers/glibc-bot/src/gcc/gcc/cp/parser.c:12648
0x80c0f3 cp_parser_translation_unit
        /scratch/jmyers/glibc-bot/src/gcc/gcc/cp/parser.c:4563
0x80c0f3 c_parse_file()
        /scratch/jmyers/glibc-bot/src/gcc/gcc/cp/parser.c:39045
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Reply via email to