public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/100791] New: ICE: verify_gimple failed
@ 2021-05-27  5:23 cnsun at uwaterloo dot ca
  2021-05-27 14:19 ` [Bug c/100791] " marxin at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: cnsun at uwaterloo dot ca @ 2021-05-27  5:23 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100791
           Summary: ICE: verify_gimple failed
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: cnsun at uwaterloo dot ca
  Target Milestone: ---

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/scratch/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /tmp/tmp.SQC1E9RsGE-gcc-builder/gcc/configure
--enable-languages=c,c++,lto --enable-checking-yes --enable-multiarch
--prefix=/scratch/software/gcc-trunk --disable-bootstrap
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20210527 (experimental) [master revision
:d03f010a0:01c59ef2e5a59b44d2b662361196abb6be872a20] (GCC)

$ cat mutant.c
__attribute__((__always_inline__)) sprintf() {
  return log_bad_request(0, __builtin_va_arg_pack());
}
void log_bad_request() { sprintf(0); }

$ gcc-trunk  mutant.c
mutant.c:1:36: warning: return type defaults to ‘int’ [-Wimplicit-int]
    1 | __attribute__((__always_inline__)) sprintf() {
      |                                    ^~~~~~~
mutant.c:1:36: warning: conflicting types for built-in function ‘sprintf’;
expected ‘int(char *, const char *, ...)’ [-Wbuiltin-declaration-mismatch]
mutant.c:1:1: note: ‘sprintf’ is declared in header ‘<stdio.h>’
  +++ |+#include <stdio.h>
    1 | __attribute__((__always_inline__)) sprintf() {
mutant.c: In function ‘sprintf’:
mutant.c:1:36: warning: number of arguments doesn’t match built-in prototype
    1 | __attribute__((__always_inline__)) sprintf() {
      |                                    ^~~~~~~
mutant.c:2:10: warning: implicit declaration of function ‘log_bad_request’
[-Wimplicit-function-declaration]
    2 |   return log_bad_request(0, __builtin_va_arg_pack());
      |          ^~~~~~~~~~~~~~~
mutant.c: At top level:
mutant.c:4:6: warning: conflicting types for ‘log_bad_request’; have ‘void()’
    4 | void log_bad_request() { sprintf(0); }
      |      ^~~~~~~~~~~~~~~
mutant.c:2:10: note: previous implicit declaration of ‘log_bad_request’ with
type ‘void()’
    2 |   return log_bad_request(0, __builtin_va_arg_pack());
      |          ^~~~~~~~~~~~~~~
mutant.c:1:36: warning: ‘always_inline’ function might not be inlinable
[-Wattributes]
    1 | __attribute__((__always_inline__)) sprintf() {
      |                                    ^~~~~~~
mutant.c: In function ‘log_bad_request’:
mutant.c:4:1: error: invalid conversion in gimple call
    4 | void log_bad_request() { sprintf(0); }
      | ^~~~
int

void

# .MEM_4 = VDEF <.MEM_1(D)>
_3 = log_bad_request (0, 0);
during GIMPLE pass: einline
mutant.c:4:1: internal compiler error: verify_gimple failed
0xf77e71 verify_gimple_in_cfg(function*, bool)
        /tmp/tmp.SQC1E9RsGE-gcc-builder/gcc/gcc/tree-cfg.c:5509
0xe24f6f execute_function_todo
        /tmp/tmp.SQC1E9RsGE-gcc-builder/gcc/gcc/passes.c:2042
0xe25d5e execute_todo
        /tmp/tmp.SQC1E9RsGE-gcc-builder/gcc/gcc/passes.c:2096
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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-06-16 14:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-27  5:23 [Bug c/100791] New: ICE: verify_gimple failed cnsun at uwaterloo dot ca
2021-05-27 14:19 ` [Bug c/100791] " marxin at gcc dot gnu.org
2021-05-28 10:37 ` [Bug ipa/100791] " rguenth at gcc dot gnu.org
2021-05-28 11:26 ` rguenth at gcc dot gnu.org
2021-05-28 12:25 ` cvs-commit at gcc dot gnu.org
2021-05-28 12:29 ` [Bug ipa/100791] [10/11 Regression] " rguenth at gcc dot gnu.org
2021-06-16 13:12 ` cvs-commit at gcc dot gnu.org
2021-06-16 14:24 ` [Bug ipa/100791] [10 " cvs-commit at gcc dot gnu.org
2021-06-16 14:25 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).