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

            Bug ID: 93639
           Summary: [c++2a] Segfault on non type template parameter and
                    consteval (master)
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: raphael.grimm at kit dot edu
  Target Milestone: ---

Created attachment 47802
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47802&action=edit
source

I played around with some new features and encountered a segfault:

    the exact version of GCC: 
    commit b780f68e025b2cf5631183e199ebf672ea463af6

    the system type:
    $ uname -a
    Linux i61nb061 4.15.0-76-generic #86-Ubuntu SMP Fri Jan 17 17:24:28 UTC
2020 x86_64 x86_64 x86_64 GNU/Linux

    the options given when GCC was configured/built;
    ./configure"                  \
    -v                                  \
    --build=x86_64-linux-gnu            \
    --host=x86_64-linux-gnu             \
    --target=x86_64-linux-gnu           \
    --prefix="$install_dir"             \
    --enable-checking=release           \
    --enable-languages=c,c++,fortran    \
    --disable-multilib                  \
    --program-suffix="-b780f68e025b2cf5631183e199ebf672ea463af6"


    the complete command line that triggers the bug;
    $ gcc-master test.cpp -std=c++2a -save-temps

    the compiler output (error messages, warnings, etc.);
    test.cpp:25:26: internal compiler error: Segmentation fault
   25 |     using type = a<name()>;
      |                          ^
0xc8980f crash_signal
        /home/username/repos/build-gcc/gcc/gcc/toplev.c:328
0x673d73 resolve_args(vec<tree_node*, va_gc, vl_embed>*, int)
        /home/username/repos/build-gcc/gcc/gcc/cp/call.c:4431
0x78513c do_class_deduction
        /home/username/repos/build-gcc/gcc/gcc/cp/pt.c:28599
0x78513c do_auto_deduction(tree_node*, tree_node*, tree_node*, int,
auto_deduction_context, tree_node*, int)
        /home/username/repos/build-gcc/gcc/gcc/cp/pt.c:28732
0x7865cd convert_template_argument
        /home/username/repos/build-gcc/gcc/gcc/cp/pt.c:8309
0x798db7 convert_template_argument
        /home/username/repos/build-gcc/gcc/gcc/cp/pt.c:8082
0x798db7 coerce_template_parms
        /home/username/repos/build-gcc/gcc/gcc/cp/pt.c:8813
0x79cbd9 lookup_template_class_1
        /home/username/repos/build-gcc/gcc/gcc/cp/pt.c:9668
0x79dedc lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
        /home/username/repos/build-gcc/gcc/gcc/cp/pt.c:10040
0x7b925d finish_template_type(tree_node*, tree_node*, int)
        /home/username/repos/build-gcc/gcc/gcc/cp/semantics.c:3407
0x762265 cp_parser_template_id
        /home/username/repos/build-gcc/gcc/gcc/cp/parser.c:16681
0x7624b7 cp_parser_class_name
        /home/username/repos/build-gcc/gcc/gcc/cp/parser.c:23618
0x75f2e1 cp_parser_qualifying_entity
        /home/username/repos/build-gcc/gcc/gcc/cp/parser.c:6738
0x75f2e1 cp_parser_nested_name_specifier_opt
        /home/username/repos/build-gcc/gcc/gcc/cp/parser.c:6410
0x766661 cp_parser_simple_type_specifier
        /home/username/repos/build-gcc/gcc/gcc/cp/parser.c:18076
0x74d46c cp_parser_type_specifier
        /home/username/repos/build-gcc/gcc/gcc/cp/parser.c:17734
0x760af2 cp_parser_type_specifier_seq
        /home/username/repos/build-gcc/gcc/gcc/cp/parser.c:22307
0x75adb4 cp_parser_type_id_1
        /home/username/repos/build-gcc/gcc/gcc/cp/parser.c:22124
0x75bf58 cp_parser_type_id
        /home/username/repos/build-gcc/gcc/gcc/cp/parser.c:22203
0x75bf58 cp_parser_alias_declaration
        /home/username/repos/build-gcc/gcc/gcc/cp/parser.c:19949
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