https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98197
Bug ID: 98197
Summary: [11 Regresson] internal compiler error: Floating point
exception
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
struct struct_0 { char field_0 ; } ;
struct struct_0 { struct struct_0 field_1 ; } x[1];
int foo ( ) {
__builtin_clear_padding ( & x ) ;
}
--------------------------------------------------------------------------------
$ gcc-11 --version
gcc (GCC) 11.0.0 20201129 (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-11 test.c
test.c:4:8: error: redefinition of ‘struct struct_0’
4 | struct struct_0 { struct struct_0 field_1 ; } x[1];
| ^~~~~~~~
test.c:2:8: note: originally defined here
2 | struct struct_0 { char field_0 ; } ;
| ^~~~~~~~
test.c:4:35: error: field ‘field_1’ has incomplete type
4 | struct struct_0 { struct struct_0 field_1 ; } x[1];
| ^~~~~~~
during GIMPLE pass: lower
test.c: In function ‘foo’:
test.c:6:5: internal compiler error: Floating point exception
6 | int foo ( ) {
| ^~~
0xdeeb4f crash_signal
../../gcc-11-20201129/gcc/toplev.c:330
0xb13bce clear_padding_type
../../gcc-11-20201129/gcc/gimple-fold.c:4555
0xb14953 gimple_fold_builtin_clear_padding
../../gcc-11-20201129/gcc/gimple-fold.c:4723
0xb23770 gimple_fold_builtin
../../gcc-11-20201129/gcc/gimple-fold.c:4897
0xb23770 gimple_fold_call
../../gcc-11-20201129/gcc/gimple-fold.c:5328
0xb23ffb fold_stmt_1
../../gcc-11-20201129/gcc/gimple-fold.c:6029
0x17b0c3f lower_stmt
../../gcc-11-20201129/gcc/gimple-low.c:388
0x17b05e2 lower_sequence
../../gcc-11-20201129/gcc/gimple-low.c:217
0x17b05e2 lower_gimple_bind
../../gcc-11-20201129/gcc/gimple-low.c:473
0x17b1759 lower_function_body
../../gcc-11-20201129/gcc/gimple-low.c:110
0x17b1759 execute
../../gcc-11-20201129/gcc/gimple-low.c:195
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-10 --version
gcc (GCC) 10.2.1 20201128
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-10 test.c
test.c:4:8: error: redefinition of ‘struct struct_0’
4 | struct struct_0 { struct struct_0 field_1 ; } x[1];
| ^~~~~~~~
test.c:2:8: note: originally defined here
2 | struct struct_0 { char field_0 ; } ;
| ^~~~~~~~
test.c:4:35: error: field ‘field_1’ has incomplete type
4 | struct struct_0 { struct struct_0 field_1 ; } x[1];
| ^~~~~~~
test.c: In function ‘foo’:
test.c:7:2: warning: implicit declaration of function
‘__builtin_clear_padding’; did you mean ‘__builtin_nearbyint’?
[]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Wimplicit-function-declaration]8;;]
7 | __builtin_clear_padding ( & x ) ;
| ^~~~~~~~~~~~~~~~~~~~~~~
| __builtin_nearbyint