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
Author: jakub Date: Thu Feb 28 13:49:38 2019 New Revision: 269280 URL: https://gcc.gnu.org/viewcvs?rev=269280&root=gcc&view=rev Log: PR c/89521 * gcc.dg/pr89521-1.c: New test. * gcc.dg/pr89521-2.c: New test. Added: trunk/gcc/testsuite/gcc.dg/pr89521-1.c trunk/gcc/testsuite/gcc.dg/pr89521-2.c Modified: trunk/gcc/testsuite/ChangeLog
The PR89520 fix actually fixed this one too. *** This bug has been marked as a duplicate of bug 89520 ***
Author: jakub Date: Tue Apr 30 20:34:49 2019 New Revision: 270718 URL: https://gcc.gnu.org/viewcvs?rev=270718&root=gcc&view=rev Log: Backported from mainline 2019-02-28 Jakub Jelinek <jakub@redhat.com> PR c/89521 * gcc.dg/pr89521-1.c: New test. * gcc.dg/pr89521-2.c: New test. Added: branches/gcc-8-branch/gcc/testsuite/gcc.dg/pr89521-1.c branches/gcc-8-branch/gcc/testsuite/gcc.dg/pr89521-2.c Modified: branches/gcc-8-branch/gcc/testsuite/ChangeLog
Author: jakub Date: Fri Aug 30 12:11:38 2019 New Revision: 275121 URL: https://gcc.gnu.org/viewcvs?rev=275121&root=gcc&view=rev Log: Backported from mainline 2019-02-28 Jakub Jelinek <jakub@redhat.com> PR c/89521 * gcc.dg/pr89521-1.c: New test. * gcc.dg/pr89521-2.c: New test. Added: branches/gcc-7-branch/gcc/testsuite/gcc.dg/pr89521-1.c branches/gcc-7-branch/gcc/testsuite/gcc.dg/pr89521-2.c Modified: branches/gcc-7-branch/gcc/testsuite/ChangeLog