public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/103378] New: [12 Regression] ICE: verify_cgraph_node failed (error: semantic interposition mismatch)
@ 2021-11-23 10:03 asolokha at gmx dot com
  2021-11-23 10:08 ` [Bug ipa/103378] [12 Regression] ICE: verify_cgraph_node failed (error: semantic interposition mismatch) since r12-5412-g458d2c689963d846 marxin at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: asolokha at gmx dot com @ 2021-11-23 10:03 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103378
           Summary: [12 Regression] ICE: verify_cgraph_node failed (error:
                    semantic interposition mismatch)
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

gcc-12.0.0-alpha20211121 snapshot (g:da17c304e22ba256eba0b03710aa329115163b08)
ICEs when compiling the following testcase, extracted from
gcc/testsuite/c-c++-common/attr-opt-1.c, w/ -Ofast:

__attribute__ ((optimize ("no-associative-math"))) double
fn3 (double h, double l)
{
  return h + l;
}

double fn3 (double, double) __attribute__ ((optimize
("O2,no-associative-math")));

% gcc-12.0.0 -Ofast -w -c rtonutgr.c
rtonutgr.c:7:1: error: semantic interposition mismatch
    7 | double fn3 (double, double) __attribute__ ((optimize
("O2,no-associative-math")));
      | ^~~~~~
fn3/0 (fn3) @0x7f290eed1220
  Type: function definition analyzed
  Visibility: externally_visible public
  References:
  Referring:
  Availability: available
  Function flags: body
  Called by:
  Calls:
during IPA pass: visibility
rtonutgr.c:7:1: internal compiler error: verify_cgraph_node failed
0x9fc620 cgraph_node::verify_node()
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/cgraph.c:3873
0x9eb854 symtab_node::verify()
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/symtab.c:1358
0x9eca37 symtab_node::verify_symtab_nodes()
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/symtab.c:1386
0xca49a4 symtab_node::checking_verify_symtab_nodes()
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/cgraph.h:682
0xca49a4 symbol_table::remove_unreachable_nodes(_IO_FILE*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/ipa.c:679
0xdb9289 execute_todo
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/passes.c:2110

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

* [Bug ipa/103378] [12 Regression] ICE: verify_cgraph_node failed (error: semantic interposition mismatch) since r12-5412-g458d2c689963d846
  2021-11-23 10:03 [Bug ipa/103378] New: [12 Regression] ICE: verify_cgraph_node failed (error: semantic interposition mismatch) asolokha at gmx dot com
@ 2021-11-23 10:08 ` marxin at gcc dot gnu.org
  2021-11-23 10:13 ` hubicka at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-11-23 10:08 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jamborm at gcc dot gnu.org
   Last reconfirmed|                            |2021-11-23
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
            Summary|[12 Regression] ICE:        |[12 Regression] ICE:
                   |verify_cgraph_node failed   |verify_cgraph_node failed
                   |(error: semantic            |(error: semantic
                   |interposition mismatch)     |interposition mismatch)
                   |                            |since
                   |                            |r12-5412-g458d2c689963d846

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r12-5412-g458d2c689963d846, note there's a warning:

pr103378.c:7:1: warning: optimization attribute on ‘fn3’ follows definition but
the attribute doesn’t match [-Wattributes]
    7 | double fn3 (double, double) __attribute__ ((optimize
("O2,no-associative-math")));
      | ^~~~~~
pr103378.c:2:1: note: previous definition of ‘fn3’ with type ‘double(double, 
double)’
    2 | fn3 (double h, double l)
      | ^~~

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

* [Bug ipa/103378] [12 Regression] ICE: verify_cgraph_node failed (error: semantic interposition mismatch) since r12-5412-g458d2c689963d846
  2021-11-23 10:03 [Bug ipa/103378] New: [12 Regression] ICE: verify_cgraph_node failed (error: semantic interposition mismatch) asolokha at gmx dot com
  2021-11-23 10:08 ` [Bug ipa/103378] [12 Regression] ICE: verify_cgraph_node failed (error: semantic interposition mismatch) since r12-5412-g458d2c689963d846 marxin at gcc dot gnu.org
@ 2021-11-23 10:13 ` hubicka at gcc dot gnu.org
  2021-11-23 11:38 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: hubicka at gcc dot gnu.org @ 2021-11-23 10:13 UTC (permalink / raw)
  To: gcc-bugs

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

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

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

--- Comment #2 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
mine.

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

* [Bug ipa/103378] [12 Regression] ICE: verify_cgraph_node failed (error: semantic interposition mismatch) since r12-5412-g458d2c689963d846
  2021-11-23 10:03 [Bug ipa/103378] New: [12 Regression] ICE: verify_cgraph_node failed (error: semantic interposition mismatch) asolokha at gmx dot com
  2021-11-23 10:08 ` [Bug ipa/103378] [12 Regression] ICE: verify_cgraph_node failed (error: semantic interposition mismatch) since r12-5412-g458d2c689963d846 marxin at gcc dot gnu.org
  2021-11-23 10:13 ` hubicka at gcc dot gnu.org
@ 2021-11-23 11:38 ` rguenth at gcc dot gnu.org
  2021-11-23 16:57 ` hubicka at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-23 11:38 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.0
           Priority|P3                          |P1

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

* [Bug ipa/103378] [12 Regression] ICE: verify_cgraph_node failed (error: semantic interposition mismatch) since r12-5412-g458d2c689963d846
  2021-11-23 10:03 [Bug ipa/103378] New: [12 Regression] ICE: verify_cgraph_node failed (error: semantic interposition mismatch) asolokha at gmx dot com
                   ` (2 preceding siblings ...)
  2021-11-23 11:38 ` rguenth at gcc dot gnu.org
@ 2021-11-23 16:57 ` hubicka at gcc dot gnu.org
  2022-01-18 20:12 ` dcb314 at hotmail dot com
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: hubicka at gcc dot gnu.org @ 2021-11-23 16:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
This is ugly.
It is caused by the fact that frontned first finalizes the function and then
changes the attribute (by adding new attribute).  I guess I can re-process the
attributes again after compilation unit is finished...

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

* [Bug ipa/103378] [12 Regression] ICE: verify_cgraph_node failed (error: semantic interposition mismatch) since r12-5412-g458d2c689963d846
  2021-11-23 10:03 [Bug ipa/103378] New: [12 Regression] ICE: verify_cgraph_node failed (error: semantic interposition mismatch) asolokha at gmx dot com
                   ` (3 preceding siblings ...)
  2021-11-23 16:57 ` hubicka at gcc dot gnu.org
@ 2022-01-18 20:12 ` dcb314 at hotmail dot com
  2022-01-19  6:42 ` marxin at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: dcb314 at hotmail dot com @ 2022-01-18 20:12 UTC (permalink / raw)
  To: gcc-bugs

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

David Binderman <dcb314 at hotmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dcb314 at hotmail dot com

--- Comment #4 from David Binderman <dcb314 at hotmail dot com> ---
Still seems to be going wrong with gcc trunk dated 20220118.

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

* [Bug ipa/103378] [12 Regression] ICE: verify_cgraph_node failed (error: semantic interposition mismatch) since r12-5412-g458d2c689963d846
  2021-11-23 10:03 [Bug ipa/103378] New: [12 Regression] ICE: verify_cgraph_node failed (error: semantic interposition mismatch) asolokha at gmx dot com
                   ` (4 preceding siblings ...)
  2022-01-18 20:12 ` dcb314 at hotmail dot com
@ 2022-01-19  6:42 ` marxin at gcc dot gnu.org
  2022-04-07 11:34 ` hubicka at gcc dot gnu.org
  2022-04-09 20:56 ` hubicka at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-01-19  6:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
@Honza: Any progress with this one?

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

* [Bug ipa/103378] [12 Regression] ICE: verify_cgraph_node failed (error: semantic interposition mismatch) since r12-5412-g458d2c689963d846
  2021-11-23 10:03 [Bug ipa/103378] New: [12 Regression] ICE: verify_cgraph_node failed (error: semantic interposition mismatch) asolokha at gmx dot com
                   ` (5 preceding siblings ...)
  2022-01-19  6:42 ` marxin at gcc dot gnu.org
@ 2022-04-07 11:34 ` hubicka at gcc dot gnu.org
  2022-04-09 20:56 ` hubicka at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: hubicka at gcc dot gnu.org @ 2022-04-07 11:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
I am testing
diff --git a/gcc/cgraphunit.cc b/gcc/cgraphunit.cc
index 01f4e28204e..bc3dc754481 100644
--- a/gcc/cgraphunit.cc
+++ b/gcc/cgraphunit.cc
@@ -621,6 +621,7 @@ cgraph_node::analyze (void)
   tree decl = this->decl;
   location_t saved_loc = input_location;
   input_location = DECL_SOURCE_LOCATION (decl);
+  semantic_interposition = opt_for_fn (decl, flag_semantic_interposition);

   if (thunk)
     {

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

* [Bug ipa/103378] [12 Regression] ICE: verify_cgraph_node failed (error: semantic interposition mismatch) since r12-5412-g458d2c689963d846
  2021-11-23 10:03 [Bug ipa/103378] New: [12 Regression] ICE: verify_cgraph_node failed (error: semantic interposition mismatch) asolokha at gmx dot com
                   ` (6 preceding siblings ...)
  2022-04-07 11:34 ` hubicka at gcc dot gnu.org
@ 2022-04-09 20:56 ` hubicka at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: hubicka at gcc dot gnu.org @ 2022-04-09 20:56 UTC (permalink / raw)
  To: gcc-bugs

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

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

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

--- Comment #7 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Fixed by r:4943b75e9f06f0b64ed541430bb7fbccf55fc552
Sorry for wrong PR marker :( I should have cut&pasted.

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

end of thread, other threads:[~2022-04-09 20:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-23 10:03 [Bug ipa/103378] New: [12 Regression] ICE: verify_cgraph_node failed (error: semantic interposition mismatch) asolokha at gmx dot com
2021-11-23 10:08 ` [Bug ipa/103378] [12 Regression] ICE: verify_cgraph_node failed (error: semantic interposition mismatch) since r12-5412-g458d2c689963d846 marxin at gcc dot gnu.org
2021-11-23 10:13 ` hubicka at gcc dot gnu.org
2021-11-23 11:38 ` rguenth at gcc dot gnu.org
2021-11-23 16:57 ` hubicka at gcc dot gnu.org
2022-01-18 20:12 ` dcb314 at hotmail dot com
2022-01-19  6:42 ` marxin at gcc dot gnu.org
2022-04-07 11:34 ` hubicka at gcc dot gnu.org
2022-04-09 20:56 ` hubicka 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).