https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89521
Bug ID: 89521
Summary: ICE in expand_builtin_int_roundingfn, at
builtins.c:2697
Product: gcc
Version: 9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: [email protected]
Target Milestone: ---
A variation of pr89520 (closely related, but possibly valid) :
$ cat z1.c
double ceil ();
double floor ();
long aceil () { return ceil (1); }
long afloor () { return floor (1); }
$ gcc-9-20190224 -c z1.c -O2
z1.c: In function 'aceil':
z1.c:3:30: warning: 'ceil' argument 1 type is 'int' where 'double' is expected
in a call to built-in function declared without prototype
[-Wbuiltin-declaration-mismatch]
3 | long aceil () { return ceil (1); }
| ^
z1.c:1:8: note: built-in 'ceil' declared here
1 | double ceil ();
| ^~~~
z1.c: In function 'afloor':
z1.c:4:32: warning: 'floor' argument 1 type is 'int' where 'double' is expected
in a call to built-in function declared without prototype
[-Wbuiltin-declaration-mismatch]
4 | long afloor () { return floor (1); }
| ^
z1.c:2:8: note: built-in 'floor' declared here
2 | double floor ();
| ^~~~~
during RTL pass: expand
z1.c: In function 'aceil':
z1.c:3:24: internal compiler error: in expand_builtin_int_roundingfn, at
builtins.c:2697
3 | long aceil () { return ceil (1); }
| ^~~~~~~~
0x73714c expand_builtin_int_roundingfn
../../gcc/builtins.c:2697
0x74c390 expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int)
../../gcc/builtins.c:7332
0x8a9b86 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
../../gcc/expr.c:11029
0x8b5936 store_expr(tree_node*, rtx_def*, int, bool, bool)
../../gcc/expr.c:5673
0x8b7228 expand_assignment(tree_node*, tree_node*, bool)
../../gcc/expr.c:5436
0x772112 expand_call_stmt
../../gcc/cfgexpand.c:2722
0x772112 expand_gimple_stmt_1
../../gcc/cfgexpand.c:3691
0x772112 expand_gimple_stmt
../../gcc/cfgexpand.c:3850
0x774cd8 expand_gimple_tailcall
../../gcc/cfgexpand.c:3897
0x774cd8 expand_gimple_basic_block
../../gcc/cfgexpand.c:5863
0x77abde execute
../../gcc/cfgexpand.c:6509