https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105150
Bug ID: 105150 Summary: [9/10/11/12 Regression] ICE with -Ofast: verify_gimple failed Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Affects versions down to r6, at -Ofast : $ cat z1.c #define A(name) __typeof (__builtin_##name (0)) name (); \ float name##1 () { return !name (1); } \ double name##2 () { return name (1.0L); } #define B(name) A(name) A(name##l) B (sqrt) $ gcc-5 -c z1.c -Ofast $ $ gcc-12-20220403 -c z1.c -Ofast z1.c: In function 'sqrt1': z1.c:2:36: warning: 'sqrt' argument 1 type is 'int' where 'double' is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch] 2 | float name##1 () { return !name (1); } \ | ^ z1.c:4:17: note: in expansion of macro 'A' 4 | #define B(name) A(name) A(name##l) | ^ z1.c:5:1: note: in expansion of macro 'B' 5 | B (sqrt) | ^ z1.c:5:4: note: built-in 'sqrt' declared here 5 | B (sqrt) | ^~~~ z1.c:1:49: note: in definition of macro 'A' 1 | #define A(name) __typeof (__builtin_##name (0)) name (); \ | ^~~~ z1.c:5:1: note: in expansion of macro 'B' 5 | B (sqrt) | ^ z1.c: In function 'sqrt2': z1.c:3:36: warning: 'sqrt' argument 1 type is 'long double' where 'double' is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch] 3 | double name##2 () { return name (1.0L); } | ^~~~ z1.c:4:17: note: in expansion of macro 'A' 4 | #define B(name) A(name) A(name##l) | ^ z1.c:5:1: note: in expansion of macro 'B' 5 | B (sqrt) | ^ z1.c:5:4: note: built-in 'sqrt' declared here 5 | B (sqrt) | ^~~~ z1.c:1:49: note: in definition of macro 'A' 1 | #define A(name) __typeof (__builtin_##name (0)) name (); \ | ^~~~ z1.c:5:1: note: in expansion of macro 'B' 5 | B (sqrt) | ^ z1.c: In function 'sqrtl1': z1.c:2:36: warning: 'sqrtl' argument 1 type is 'int' where 'long double' is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch] 2 | float name##1 () { return !name (1); } \ | ^ z1.c:4:25: note: in expansion of macro 'A' 4 | #define B(name) A(name) A(name##l) | ^ z1.c:5:1: note: in expansion of macro 'B' 5 | B (sqrt) | ^ z1.c:5:4: note: built-in 'sqrtl' declared here 5 | B (sqrt) | ^~~~ z1.c:1:49: note: in definition of macro 'A' 1 | #define A(name) __typeof (__builtin_##name (0)) name (); \ | ^~~~ z1.c:5:1: note: in expansion of macro 'B' 5 | B (sqrt) | ^ z1.c: In function 'sqrt1': z1.c:5:4: error: mismatching comparison operand types 5 | B (sqrt) | ^~~~ z1.c:2:9: note: in definition of macro 'A' 2 | float name##1 () { return !name (1); } \ | ^~~~ z1.c:5:1: note: in expansion of macro 'B' 5 | B (sqrt) | ^ int double if (1 == 0.0) goto <D.1991>; else goto <D.1992>; z1.c:5:4: internal compiler error: 'verify_gimple' failed 5 | B (sqrt) | ^~~~ z1.c:2:9: note: in definition of macro 'A' 2 | float name##1 () { return !name (1); } \ | ^~~~ z1.c:5:1: note: in expansion of macro 'B' 5 | B (sqrt) | ^ 0xe5ecad verify_gimple_in_seq(gimple*) ../../gcc/tree-cfg.cc:5213 0xad1ac1 gimplify_body(tree_node*, bool) ../../gcc/gimplify.cc:16438 0xad1d67 gimplify_function_tree(tree_node*) ../../gcc/gimplify.cc:16509 0x8e2d87 cgraph_node::analyze() ../../gcc/cgraphunit.cc:675 0x8e6036 analyze_functions ../../gcc/cgraphunit.cc:1240 0x8e720d symbol_table::finalize_compilation_unit() ../../gcc/cgraphunit.cc:2500