public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/101858] New: [12 Regression] ICE: ‘verify_gimple’ failed
@ 2021-08-11  7:42 anbu1024.me at gmail dot com
  2021-08-11  8:07 ` [Bug c/101858] " marxin at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: anbu1024.me at gmail dot com @ 2021-08-11  7:42 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101858
           Summary: [12 Regression] ICE: ‘verify_gimple’ failed
           Product: gcc
           Version: 12.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 

int foo(a)
{
    if ( a < (int*)(1LL << a))
        a = 0;

    return a;
}

----------------------------------------------------------------

$ gcc-sp12 --version
gcc (GCC) 12.0.0 20210729 (experimental)
Copyright (C) 2021 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-sp12 test.c 
test.c: In function ‘foo’:
test.c:2:5: warning: type of ‘a’ defaults to ‘int’ [-Wimplicit-int]
    2 | int foo(a)
      |     ^~~
test.c:4:12: warning: comparison between pointer and integer
    4 |     if ( a < (int*)(1LL << a))
      |            ^
test.c:2:5: error: type mismatch in ‘rshift_expr’
    2 | int foo(a)
      |     ^~~
int *
int *
int
_3 = _2 >> a;
test.c:2:5: internal compiler error: ‘verify_gimple’ failed
0xecbccd verify_gimple_in_seq(gimple*)
        ../../gcc-12-20210801/gcc/tree-cfg.c:5183
0xbe644a gimplify_body(tree_node*, bool)
        ../../gcc-12-20210801/gcc/gimplify.c:15539
0xbe657d gimplify_function_tree(tree_node*)
        ../../gcc-12-20210801/gcc/gimplify.c:15610
0xa1ed77 cgraph_node::analyze()
        ../../gcc-12-20210801/gcc/cgraphunit.c:670
0xa218f7 analyze_functions
        ../../gcc-12-20210801/gcc/cgraphunit.c:1234
0xa225bd symbol_table::finalize_compilation_unit()
        ../../gcc-12-20210801/gcc/cgraphunit.c:2508
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-sp11 --version
gcc (GCC) 11.1.1 20210717
Copyright (C) 2021 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-sp11 test.c 
test.c: In function ‘foo’:
test.c:2:5: warning: type of ‘a’ defaults to ‘int’ [-Wimplicit-int]
    2 | int foo(a)
      |     ^~~
test.c:4:12: warning: comparison between pointer and integer
    4 |     if ( a < (int*)(1LL << a))
      |            ^
/usr/bin/ld: /lib/x86_64-linux-gnu/crt1.o: in function `_start':
(.text+0x24): undefined reference to `main'
collect2: error: ld returned 1 exit status

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

end of thread, other threads:[~2021-08-11 12:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-11  7:42 [Bug c/101858] New: [12 Regression] ICE: ‘verify_gimple’ failed anbu1024.me at gmail dot com
2021-08-11  8:07 ` [Bug c/101858] " marxin at gcc dot gnu.org
2021-08-11  8:15 ` [Bug middle-end/101858] " rguenth at gcc dot gnu.org
2021-08-11 12:01 ` cvs-commit at gcc dot gnu.org
2021-08-11 12:01 ` 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).