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

            Bug ID: 96545
           Summary: [10/11] internal compiler error: Segmentation fault
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: anbu1024.me at gmail dot com
  Target Milestone: ---

$ cat test.c

extern char x[]; 
extern char y[];
extern char z[];

void foo ()
{
    __atomic_exchange ( & x , & y , & z , & z ) ;
}

-------------------------------------------------------------------------------

$ gcc-snapshot11 --version
gcc (GCC) 11.0.0 20200802 (experimental)
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

-------------------------------------------------------------------------------

$ gcc-snapshot11 test.c 
test.c: In function ‘foo’:
test.c:8:5: internal compiler error: Segmentation fault
    8 |     __atomic_exchange ( & x , & y , & z , & z ) ;
      |     ^~~~~~~~~~~~~~~~~
0xdd207f crash_signal
        ../../gcc-11-20200802/gcc/toplev.c:328
0x871826 get_atomic_generic_size
        ../../gcc-11-20200802/gcc/c-family/c-common.c:7021
0x8a164d resolve_overloaded_atomic_exchange
        ../../gcc-11-20200802/gcc/c-family/c-common.c:7219
0x8a164d resolve_overloaded_builtin(unsigned int, tree_node*, vec<tree_node*,
va_gc, vl_embed>*)
        ../../gcc-11-20200802/gcc/c-family/c-common.c:7564
0x82a674 c_build_function_call_vec(unsigned int, vec<unsigned int, va_heap,
vl_ptr>, tree_node*, vec<tree_node*, va_gc, vl_embed>*, vec<tree_node*, va_gc,
vl_embed>*)
        ../../gcc-11-20200802/gcc/c/c-typeck.c:3202
0x848c1c c_parser_postfix_expression_after_primary
        ../../gcc-11-20200802/gcc/c/c-parser.c:10536
0x840901 c_parser_postfix_expression
        ../../gcc-11-20200802/gcc/c/c-parser.c:10209
0x8449fa c_parser_unary_expression
        ../../gcc-11-20200802/gcc/c/c-parser.c:8306
0x84620d c_parser_cast_expression
        ../../gcc-11-20200802/gcc/c/c-parser.c:8148
0x846499 c_parser_binary_expression
        ../../gcc-11-20200802/gcc/c/c-parser.c:7951
0x847475 c_parser_conditional_expression
        ../../gcc-11-20200802/gcc/c/c-parser.c:7685
0x847ab0 c_parser_expr_no_commas
        ../../gcc-11-20200802/gcc/c/c-parser.c:7600
0x847d21 c_parser_expression
        ../../gcc-11-20200802/gcc/c/c-parser.c:10672
0x8484c7 c_parser_expression_conv
        ../../gcc-11-20200802/gcc/c/c-parser.c:10705
0x83de7b c_parser_statement_after_labels
        ../../gcc-11-20200802/gcc/c/c-parser.c:6329
0x8400d1 c_parser_compound_statement_nostart
        ../../gcc-11-20200802/gcc/c/c-parser.c:5833
0x85c7b4 c_parser_compound_statement
        ../../gcc-11-20200802/gcc/c/c-parser.c:5645
0x85e20b c_parser_declaration_or_fndef
        ../../gcc-11-20200802/gcc/c/c-parser.c:2533
0x866893 c_parser_external_declaration
        ../../gcc-11-20200802/gcc/c/c-parser.c:1773
0x867389 c_parser_translation_unit
        ../../gcc-11-20200802/gcc/c/c-parser.c:1646
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.

-------------------------------------------------------------------------------

$ gcc-snapshot10 --version
gcc (GCC) 10.2.1 20200725
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

-------------------------------------------------------------------------------

$ gcc-snapshot10 test.c 
test.c: In function ‘foo’:
test.c:8:5: internal compiler error: Segmentation fault
    8 |     __atomic_exchange ( & x , & y , & z , & z ) ;
      |     ^~~~~~~~~~~~~~~~~
0xaecd9f crash_signal
        ../../gcc-10-20200725/gcc/toplev.c:328
0x65199b get_atomic_generic_size
        ../../gcc-10-20200725/gcc/c-family/c-common.c:6952
0x67d277 resolve_overloaded_atomic_exchange
        ../../gcc-10-20200725/gcc/c-family/c-common.c:7117
0x67d277 resolve_overloaded_builtin(unsigned int, tree_node*, vec<tree_node*,
va_gc, vl_embed>*)
        ../../gcc-10-20200725/gcc/c-family/c-common.c:7462
0x615203 c_build_function_call_vec(unsigned int, vec<unsigned int, va_heap,
vl_ptr>, tree_node*, vec<tree_node*, va_gc, vl_embed>*, vec<tree_node*, va_gc,
vl_embed>*)
        ../../gcc-10-20200725/gcc/c/c-typeck.c:3199
0x62f5de c_parser_postfix_expression_after_primary
        ../../gcc-10-20200725/gcc/c/c-parser.c:10501
0x627eb1 c_parser_postfix_expression
        ../../gcc-10-20200725/gcc/c/c-parser.c:10176
0x62b77a c_parser_unary_expression
        ../../gcc-10-20200725/gcc/c/c-parser.c:8273
0x62cefd c_parser_cast_expression
        ../../gcc-10-20200725/gcc/c/c-parser.c:8115
0x62d18e c_parser_binary_expression
        ../../gcc-10-20200725/gcc/c/c-parser.c:7918
0x62e0c5 c_parser_conditional_expression
        ../../gcc-10-20200725/gcc/c/c-parser.c:7652
0x62e5f0 c_parser_expr_no_commas
        ../../gcc-10-20200725/gcc/c/c-parser.c:7569
0x62e851 c_parser_expression
        ../../gcc-10-20200725/gcc/c/c-parser.c:10637
0x62ef57 c_parser_expression_conv
        ../../gcc-10-20200725/gcc/c/c-parser.c:10670
0x62545b c_parser_statement_after_labels
        ../../gcc-10-20200725/gcc/c/c-parser.c:6301
0x6276a1 c_parser_compound_statement_nostart
        ../../gcc-10-20200725/gcc/c/c-parser.c:5805
0x6411c4 c_parser_compound_statement
        ../../gcc-10-20200725/gcc/c/c-parser.c:5617
0x642a35 c_parser_declaration_or_fndef
        ../../gcc-10-20200725/gcc/c/c-parser.c:2505
0x649723 c_parser_external_declaration
        ../../gcc-10-20200725/gcc/c/c-parser.c:1745
0x64a221 c_parser_translation_unit
        ../../gcc-10-20200725/gcc/c/c-parser.c:1618
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