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

            Bug ID: 84965
           Summary: internal compiler error: unexpected expression
                    '__alignof__ (({...}))' of kind alignof_expr
           Product: gcc
           Version: 8.0.1
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vegard.nossum at oracle dot com
                CC: webrown.cpp at gmail dot com
  Target Milestone: ---

Input:

void a() { [](decltype((alignof({}) != 0 && (auto)))) }

Output:

$ cc1plus 
 void a()
<stdin>:1:35: warning: invalid application of '__alignof__' to a void type
[-Wpointer-arith]
<stdin>:1:46: error: expected primary-expression before 'auto'
<stdin>:1:46: error: expected ')' before 'auto'
<stdin>:1:53: internal compiler error: unexpected expression '__alignof__
(({...}))' of kind alignof_expr
0xa38a8b cxx_eval_constant_expression
        /home/vegard/git/gcc/gcc/cp/constexpr.c:4772
0xa3fa54 cxx_eval_binary_expression
        /home/vegard/git/gcc/gcc/cp/constexpr.c:2019
0xa3046c cxx_eval_constant_expression
        /home/vegard/git/gcc/gcc/cp/constexpr.c:4452
0xa4996a cxx_eval_outermost_constant_expr
        /home/vegard/git/gcc/gcc/cp/constexpr.c:4832
0xa57256 maybe_constant_value(tree_node*, tree_node*)
        /home/vegard/git/gcc/gcc/cp/constexpr.c:5049
0xab6bea cp_fully_fold(tree_node*)
        /home/vegard/git/gcc/gcc/cp/cp-gimplify.c:2041
0xec373b cp_parser_binary_expression
        /home/vegard/git/gcc/gcc/cp/parser.c:9297
0xec62ca cp_parser_assignment_expression
        /home/vegard/git/gcc/gcc/cp/parser.c:9486
0xec87ea cp_parser_expression
        /home/vegard/git/gcc/gcc/cp/parser.c:9655
0xf3478f cp_parser_primary_expression
        /home/vegard/git/gcc/gcc/cp/parser.c:5206
0xf7698b cp_parser_postfix_expression
        /home/vegard/git/gcc/gcc/cp/parser.c:7030
0xf2a4b7 cp_parser_unary_expression
        /home/vegard/git/gcc/gcc/cp/parser.c:8322
0xebfeca cp_parser_cast_expression
        /home/vegard/git/gcc/gcc/cp/parser.c:9090
0xec24f6 cp_parser_binary_expression
        /home/vegard/git/gcc/gcc/cp/parser.c:9191
0xec62ca cp_parser_assignment_expression
        /home/vegard/git/gcc/gcc/cp/parser.c:9486
0xec87ea cp_parser_expression
        /home/vegard/git/gcc/gcc/cp/parser.c:9655
0xf7afbe cp_parser_decltype_expr
        /home/vegard/git/gcc/gcc/cp/parser.c:14061
0xf7afbe cp_parser_decltype
        /home/vegard/git/gcc/gcc/cp/parser.c:14135
0xf2db37 cp_parser_simple_type_specifier
        /home/vegard/git/gcc/gcc/cp/parser.c:17065
0xf22abd cp_parser_type_specifier
        /home/vegard/git/gcc/gcc/cp/parser.c:16852
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.

Version:

GNU C++14 (GCC) version 8.0.1 20180306 (experimental) (x86_64-pc-linux-gnu)

Reply via email to