public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/98222] New: ICE at -O3 on x86_64-pc-linux-gnu: verify_cgraph_node failed
@ 2020-12-10 11:57 zhendong.su at inf dot ethz.ch
  2020-12-10 12:13 ` [Bug ipa/98222] [11 Regression] ICE at -O3 on x86_64-pc-linux-gnu: verify_cgraph_node failed since r11-4267-g0e590b68fa374365 marxin at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: zhendong.su at inf dot ethz.ch @ 2020-12-10 11:57 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98222
           Summary: ICE at -O3 on x86_64-pc-linux-gnu: verify_cgraph_node
                    failed
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zhendong.su at inf dot ethz.ch
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

[517] % gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/local/suz-local/software/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --disable-bootstrap
--prefix=/local/suz-local/software/local/gcc-trunk --enable-languages=c,c++
--disable-werror --enable-multilib --with-system-zlib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.0.0 20201210 (experimental) [master revision
66dea8899df:e246cb295db:680e4202f23ce74f3b26c7f090b9d22a56765554] (GCC) 
[518] % 
[518] % gcctk -O2 small.c; ./a.out
[519] % 
[519] % gcctk -O3 small.c
small.c: In function ‘f’:
small.c:3:5: error: edge points to wrong declaration:
    3 | int f (int j, int k) {
      |     ^
 <function_decl 0x7f73b4ea3800 f.constprop.isra
    type <function_type 0x7f73b4e72d20
        type <void_type 0x7f73b4d56f18 void VOID
            align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f73b4d56f18
            pointer_to_this <pointer_type 0x7f73b4d5e000>>
        QI
        size <integer_cst 0x7f73b4d3ddc8 constant 8>
        unit-size <integer_cst 0x7f73b4d3dde0 constant 1>
        align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f73b4e72d20
        arg-types <tree_list 0x7f73b4d528c0 value <void_type 0x7f73b4d56f18
void>>>
    addressable used nothrow static decl_5 QI small.c:3:5 align:8
warn_if_not_align:0 context <translation_unit_decl 0x7f73b4d4ab40 small.c>>
 Instead of: <function_decl 0x7f73b4e74200 f
    type <function_type 0x7f73b4d6e348
        type <integer_type 0x7f73b4d565e8 int public SI
            size <integer_cst 0x7f73b4d3df18 constant 32>
            unit-size <integer_cst 0x7f73b4d3df30 constant 4>
            align:32 warn_if_not_align:0 symtab:0 alias-set 1 canonical-type
0x7f73b4d565e8 precision:32 min <integer_cst 0x7f73b4d3ded0 -2147483648> max
<integer_cst 0x7f73b4d3dee8 2147483647>
            pointer_to_this <pointer_type 0x7f73b4d5e9d8>>
        QI
        size <integer_cst 0x7f73b4d3ddc8 constant 8>
        unit-size <integer_cst 0x7f73b4d3dde0 constant 1>
        align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f73b4d6e348
        arg-types <tree_list 0x7f73b4d6d2a8 value <integer_type 0x7f73b4d565e8
int>
            chain <tree_list 0x7f73b4d6d280 value <integer_type 0x7f73b4d565e8
int>
                chain <tree_list 0x7f73b4d528c0 value <void_type 0x7f73b4d56f18
void>>>>
        pointer_to_this <pointer_type 0x7f73b4e72dc8>>
    addressable used nothrow public static decl_5 QI small.c:3:5 align:8
warn_if_not_align:0 context <translation_unit_decl 0x7f73b4d4ab40 small.c>
initial <block 0x7f73b4e77420>
    result <result_decl 0x7f73b4d4aa50 D.1948 type <integer_type 0x7f73b4d565e8
int>
        ignored SI small.c:3:5 size <integer_cst 0x7f73b4d3df18 32> unit-size
<integer_cst 0x7f73b4d3df30 4>
        align:32 warn_if_not_align:0 context <function_decl 0x7f73b4e74200 f>>
    arguments <parm_decl 0x7f73b4e97180 j type <integer_type 0x7f73b4d565e8
int>
        used read SI small.c:3:12 size <integer_cst 0x7f73b4d3df18 32>
unit-size <integer_cst 0x7f73b4d3df30 4>
        align:32 warn_if_not_align:0 context <function_decl 0x7f73b4e74200 f>
arg-type <integer_type 0x7f73b4d565e8 int>
        chain <parm_decl 0x7f73b4e97200 k type <integer_type 0x7f73b4d565e8
int>
            used read SI small.c:3:19 size <integer_cst 0x7f73b4d3df18 32>
unit-size <integer_cst 0x7f73b4d3df30 4>
            align:32 warn_if_not_align:0 context <function_decl 0x7f73b4e74200
f> arg-type <integer_type 0x7f73b4d565e8 int>>>
    struct-function 0x7f73b4e99000 chain <function_decl 0x7f73b4e74400 main>>
f/42 (f) @0x7f73b4eb0440
  Type: function definition analyzed
  Visibility: artificial
  next sharing asm name: 41
  previous sharing asm name: 44
  References: b/1 (write) a/0 (read) b/1 (read) a/0 (read) c/2 (read) 
  Referring: 
  Function f/42 is inline copy in f/3
  Availability: local
  Function flags: count:462210652 (estimated locally) body local nonfreeing_fn
  Called by: f/41 (inlined) (462210652 (estimated locally),0.43 per call) 
  Calls: f/3 (415989587 (estimated locally),0.39 per call)
f.constprop.0.isra.0/6 (152529514 (estimated locally),0.14 per call) 
during IPA pass: inline
small.c:3:5: internal compiler error: verify_cgraph_node failed
0x83d218 cgraph_node::verify_node()
        ../../gcc-trunk/gcc/cgraph.c:3809
0x82956c symtab_node::verify()
        ../../gcc-trunk/gcc/symtab.c:1356
0xab2017 save_inline_function_body
        ../../gcc-trunk/gcc/ipa-inline-transform.c:679
0xab2017 inline_transform(cgraph_node*)
        ../../gcc-trunk/gcc/ipa-inline-transform.c:750
0xc29a49 execute_one_ipa_transform_pass
        ../../gcc-trunk/gcc/passes.c:2290
0xc29a49 execute_all_ipa_transforms(bool)
        ../../gcc-trunk/gcc/passes.c:2337
0x8422d5 cgraph_node::expand()
        ../../gcc-trunk/gcc/cgraphunit.c:1822
0x843c76 expand_all_functions
        ../../gcc-trunk/gcc/cgraphunit.c:1997
0x843c76 symbol_table::compile()
        ../../gcc-trunk/gcc/cgraphunit.c:2361
0x84721f symbol_table::compile()
        ../../gcc-trunk/gcc/cgraphunit.c:2545
0x84721f symbol_table::finalize_compilation_unit()
        ../../gcc-trunk/gcc/cgraphunit.c:2542
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.
[520] % 
[520] % cat small.c
int a, b, *c;

int f (int j, int k) {
  b = k / j;
  if (a)
    f(0, 0);
  *c = f(b & a, 0);
  return 0;
}

int main() {
  if (a)
    while (1)
      f(0, 0);
  return 0;
}

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

* [Bug ipa/98222] [11 Regression] ICE at -O3 on x86_64-pc-linux-gnu: verify_cgraph_node failed since r11-4267-g0e590b68fa374365
  2020-12-10 11:57 [Bug ipa/98222] New: ICE at -O3 on x86_64-pc-linux-gnu: verify_cgraph_node failed zhendong.su at inf dot ethz.ch
@ 2020-12-10 12:13 ` marxin at gcc dot gnu.org
  2020-12-11 10:21 ` marxin at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-12-10 12:13 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |10.2.0
   Target Milestone|---                         |11.0
           Priority|P3                          |P1
            Summary|ICE at -O3 on               |[11 Regression] ICE at -O3
                   |x86_64-pc-linux-gnu:        |on x86_64-pc-linux-gnu:
                   |verify_cgraph_node failed   |verify_cgraph_node failed
                   |                            |since
                   |                            |r11-4267-g0e590b68fa374365
     Ever confirmed|0                           |1
                 CC|                            |hubicka at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
           Keywords|needs-bisection             |
      Known to fail|                            |11.0
   Last reconfirmed|                            |2020-12-10

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

* [Bug ipa/98222] [11 Regression] ICE at -O3 on x86_64-pc-linux-gnu: verify_cgraph_node failed since r11-4267-g0e590b68fa374365
  2020-12-10 11:57 [Bug ipa/98222] New: ICE at -O3 on x86_64-pc-linux-gnu: verify_cgraph_node failed zhendong.su at inf dot ethz.ch
  2020-12-10 12:13 ` [Bug ipa/98222] [11 Regression] ICE at -O3 on x86_64-pc-linux-gnu: verify_cgraph_node failed since r11-4267-g0e590b68fa374365 marxin at gcc dot gnu.org
@ 2020-12-11 10:21 ` marxin at gcc dot gnu.org
  2021-01-13 12:45 ` jamborm at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-12-11 10:21 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jamborm at gcc dot gnu.org

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
@Martin: Can you please take a look? It's about a ISRA clone of a CP clone

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

* [Bug ipa/98222] [11 Regression] ICE at -O3 on x86_64-pc-linux-gnu: verify_cgraph_node failed since r11-4267-g0e590b68fa374365
  2020-12-10 11:57 [Bug ipa/98222] New: ICE at -O3 on x86_64-pc-linux-gnu: verify_cgraph_node failed zhendong.su at inf dot ethz.ch
  2020-12-10 12:13 ` [Bug ipa/98222] [11 Regression] ICE at -O3 on x86_64-pc-linux-gnu: verify_cgraph_node failed since r11-4267-g0e590b68fa374365 marxin at gcc dot gnu.org
  2020-12-11 10:21 ` marxin at gcc dot gnu.org
@ 2021-01-13 12:45 ` jamborm at gcc dot gnu.org
  2021-01-17 21:40 ` cvs-commit at gcc dot gnu.org
  2021-01-17 21:42 ` jamborm at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jamborm at gcc dot gnu.org @ 2021-01-13 12:45 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Jambor <jamborm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jamborm at gcc dot gnu.org

--- Comment #2 from Martin Jambor <jamborm at gcc dot gnu.org> ---
I'll have a look

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

* [Bug ipa/98222] [11 Regression] ICE at -O3 on x86_64-pc-linux-gnu: verify_cgraph_node failed since r11-4267-g0e590b68fa374365
  2020-12-10 11:57 [Bug ipa/98222] New: ICE at -O3 on x86_64-pc-linux-gnu: verify_cgraph_node failed zhendong.su at inf dot ethz.ch
                   ` (2 preceding siblings ...)
  2021-01-13 12:45 ` jamborm at gcc dot gnu.org
@ 2021-01-17 21:40 ` cvs-commit at gcc dot gnu.org
  2021-01-17 21:42 ` jamborm at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-01-17 21:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Jambor <jamborm@gcc.gnu.org>:

https://gcc.gnu.org/g:0f4c8f517b7954e113afb4d5c7212123c8ee2418

commit r11-6756-g0f4c8f517b7954e113afb4d5c7212123c8ee2418
Author: Martin Jambor <mjambor@suse.cz>
Date:   Sun Jan 17 22:31:09 2021 +0100

    ipa: Adjust cgraph verifier to materialization on demand (PR 98222)

    after switching to materialization of clones on demand, the verifier
    can happen to see edges leading to a clone of a materialized clone.
    This means its clone_of is NULL and former_clone_of needs to be
    checked in order to verify that the callee is a clone of the original
    decl, which it did not do and reported edges to pointing to a wrong
    place.

    Fixed with the following patch, which has been pre-approved by Honza.
    Bootstrapped and tested on x86_64-linux, pushed to master.

    Martin

    gcc/ChangeLog:

    2021-01-15  Martin Jambor  <mjambor@suse.cz>

            PR ipa/98222
            * cgraph.c (clone_of_p): Check also former_clone_of as we climb
            the clone tree.

    gcc/testsuite/ChangeLog:

    2021-01-15  Martin Jambor  <mjambor@suse.cz>

            PR ipa/98222
            * gcc.dg/ipa/pr98222.c: New test.

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

* [Bug ipa/98222] [11 Regression] ICE at -O3 on x86_64-pc-linux-gnu: verify_cgraph_node failed since r11-4267-g0e590b68fa374365
  2020-12-10 11:57 [Bug ipa/98222] New: ICE at -O3 on x86_64-pc-linux-gnu: verify_cgraph_node failed zhendong.su at inf dot ethz.ch
                   ` (3 preceding siblings ...)
  2021-01-17 21:40 ` cvs-commit at gcc dot gnu.org
@ 2021-01-17 21:42 ` jamborm at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jamborm at gcc dot gnu.org @ 2021-01-17 21:42 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Jambor <jamborm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #4 from Martin Jambor <jamborm at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2021-01-17 21:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-10 11:57 [Bug ipa/98222] New: ICE at -O3 on x86_64-pc-linux-gnu: verify_cgraph_node failed zhendong.su at inf dot ethz.ch
2020-12-10 12:13 ` [Bug ipa/98222] [11 Regression] ICE at -O3 on x86_64-pc-linux-gnu: verify_cgraph_node failed since r11-4267-g0e590b68fa374365 marxin at gcc dot gnu.org
2020-12-11 10:21 ` marxin at gcc dot gnu.org
2021-01-13 12:45 ` jamborm at gcc dot gnu.org
2021-01-17 21:40 ` cvs-commit at gcc dot gnu.org
2021-01-17 21:42 ` jamborm 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).