public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/110276] New: [13 Regression] ICE building efibootguard on x86_64-linux-gnu
@ 2023-06-16  5:13 doko at gcc dot gnu.org
  2023-06-16  8:36 ` [Bug ipa/110276] [13/14 " rguenth at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: doko at gcc dot gnu.org @ 2023-06-16  5:13 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110276
           Summary: [13 Regression] ICE building efibootguard on
                    x86_64-linux-gnu
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at gcc dot gnu.org
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

seen with the gcc-13 branch 20230611 on x86_64-linux-gnu:

works with -O1, fails with -O2

$ cat itco.i
typedef long (*EFI_PCI_IO_PROTOCOL_CONFIG)();
typedef struct {
  EFI_PCI_IO_PROTOCOL_CONFIG Read;
} EFI_PCI_IO_PROTOCOL_CONFIG_ACCESS;
typedef struct {
  EFI_PCI_IO_PROTOCOL_CONFIG_ACCESS Pci;
} EFI_PCI_IO_PROTOCOL;
int init_regs_0;
static void __attribute__((constructor)) init(EFI_PCI_IO_PROTOCOL *pci_io) {
  if (init_regs_0)
    pci_io->Pci.Read();
}
$ gcc -c -O2 -std=gnu99 -fpic -fshort-wchar -ffreestanding -fno-strict-aliasing
-fno-stack-protector itco.i 
during IPA pass: sra
itco.i:12:1: internal compiler error: in adjust_parameter_descriptions, at
ipa-sra.cc:4263
   12 | }
      | ^
0x74317d adjust_parameter_descriptions
        ../../src/gcc/ipa-sra.cc:4263
0x74317d ipa_sra_analysis
        ../../src/gcc/ipa-sra.cc:4427
0x74317d execute
        ../../src/gcc/ipa-sra.cc:4554
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.

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

* [Bug ipa/110276] [13/14 Regression] ICE building efibootguard on x86_64-linux-gnu
  2023-06-16  5:13 [Bug ipa/110276] New: [13 Regression] ICE building efibootguard on x86_64-linux-gnu doko at gcc dot gnu.org
@ 2023-06-16  8:36 ` rguenth at gcc dot gnu.org
  2023-06-16 13:48 ` jamborm at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-06-16  8:36 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|unknown                     |13.1.1
           Priority|P3                          |P2
   Target Milestone|---                         |13.2
            Summary|[13 Regression] ICE         |[13/14 Regression] ICE
                   |building efibootguard on    |building efibootguard on
                   |x86_64-linux-gnu            |x86_64-linux-gnu
   Last reconfirmed|                            |2023-06-16
     Ever confirmed|0                           |1
                 CC|                            |jamborm at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Huh, I could swear we had a duplicate ...

Confirmed on trunk.

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

* [Bug ipa/110276] [13/14 Regression] ICE building efibootguard on x86_64-linux-gnu
  2023-06-16  5:13 [Bug ipa/110276] New: [13 Regression] ICE building efibootguard on x86_64-linux-gnu doko at gcc dot gnu.org
  2023-06-16  8:36 ` [Bug ipa/110276] [13/14 " rguenth at gcc dot gnu.org
@ 2023-06-16 13:48 ` jamborm at gcc dot gnu.org
  2023-06-16 16:18 ` jamborm at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jamborm at gcc dot gnu.org @ 2023-06-16 13:48 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #2 from Martin Jambor <jamborm at gcc dot gnu.org> ---
Mine

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

* [Bug ipa/110276] [13/14 Regression] ICE building efibootguard on x86_64-linux-gnu
  2023-06-16  5:13 [Bug ipa/110276] New: [13 Regression] ICE building efibootguard on x86_64-linux-gnu doko at gcc dot gnu.org
  2023-06-16  8:36 ` [Bug ipa/110276] [13/14 " rguenth at gcc dot gnu.org
  2023-06-16 13:48 ` jamborm at gcc dot gnu.org
@ 2023-06-16 16:18 ` jamborm at gcc dot gnu.org
  2023-06-20 16:17 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jamborm at gcc dot gnu.org @ 2023-06-16 16:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Martin Jambor <jamborm at gcc dot gnu.org> ---
I have proposed a fix on the mailing list:

https://gcc.gnu.org/pipermail/gcc-patches/2023-June/622019.html

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

* [Bug ipa/110276] [13/14 Regression] ICE building efibootguard on x86_64-linux-gnu
  2023-06-16  5:13 [Bug ipa/110276] New: [13 Regression] ICE building efibootguard on x86_64-linux-gnu doko at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-06-16 16:18 ` jamborm at gcc dot gnu.org
@ 2023-06-20 16:17 ` cvs-commit at gcc dot gnu.org
  2023-06-27 16:02 ` cvs-commit at gcc dot gnu.org
  2023-06-27 16:05 ` jamborm at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-06-20 16:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 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:0be3a051c03965c5c0385b783837154902bc08fa

commit r14-1998-g0be3a051c03965c5c0385b783837154902bc08fa
Author: Martin Jambor <mjambor@suse.cz>
Date:   Tue Jun 20 18:15:22 2023 +0200

    ipa-sra: Disable candidates with no known callers (PR 110276)

    In IPA-SRA we use can_be_local_p () predicate rather than just plain
    local call graph flag in order to figure out whether the node is a
    part of an external API that we cannot change.  Although there are
    cases where this can allow more transformations, it also means we can
    analyze functions which have no callers at all, which is pointless.

    Moreover, it makes an assert of hint propagation trigger, which checks
    that we have looked at callers before processing hints that come from
    them.  This has been reported as PR 110276.

    This patch simply adds a check that a node has at least one caller
    into the early checks and makes the node a non-candidate for any
    transformation if it does not.

    gcc/ChangeLog:

    2023-06-16  Martin Jambor  <mjambor@suse.cz>

            PR ipa/110276
            * ipa-sra.cc (struct caller_issues): New field there_is_one.
            (check_for_caller_issues): Set it.
            (check_all_callers_for_issues): Check it.

    gcc/testsuite/ChangeLog:

    2023-06-16  Martin Jambor  <mjambor@suse.cz>

            PR ipa/110276
            * gcc.dg/ipa/pr110276.c: New test.

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

* [Bug ipa/110276] [13/14 Regression] ICE building efibootguard on x86_64-linux-gnu
  2023-06-16  5:13 [Bug ipa/110276] New: [13 Regression] ICE building efibootguard on x86_64-linux-gnu doko at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2023-06-20 16:17 ` cvs-commit at gcc dot gnu.org
@ 2023-06-27 16:02 ` cvs-commit at gcc dot gnu.org
  2023-06-27 16:05 ` jamborm at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-06-27 16:02 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:7085905d7842e71af7a59c7d20d050716dd22e9b

commit r13-7483-g7085905d7842e71af7a59c7d20d050716dd22e9b
Author: Martin Jambor <mjambor@suse.cz>
Date:   Tue Jun 27 18:01:13 2023 +0200

    ipa-sra: Disable candidates with no known callers (PR 110276)

    In IPA-SRA we use can_be_local_p () predicate rather than just plain
    local call graph flag in order to figure out whether the node is a
    part of an external API that we cannot change.  Although there are
    cases where this can allow more transformations, it also means we can
    analyze functions which have no callers at all, which is pointless.

    Moreover, it makes an assert of hint propagation trigger, which checks
    that we have looked at callers before processing hints that come from
    them.  This has been reported as PR 110276.

    This patch simply adds a check that a node has at least one caller
    into the early checks and makes the node a non-candidate for any
    transformation if it does not.

    gcc/ChangeLog:

    2023-06-16  Martin Jambor  <mjambor@suse.cz>

            PR ipa/110276
            * ipa-sra.cc (struct caller_issues): New field there_is_one.
            (check_for_caller_issues): Set it.
            (check_all_callers_for_issues): Check it.

    gcc/testsuite/ChangeLog:

    2023-06-16  Martin Jambor  <mjambor@suse.cz>

            PR ipa/110276
            * gcc.dg/ipa/pr110276.c: New test.

    (cherry picked from commit 8a665a8d3b45c947d5793e2c9c3df8a1c0302f03)

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

* [Bug ipa/110276] [13/14 Regression] ICE building efibootguard on x86_64-linux-gnu
  2023-06-16  5:13 [Bug ipa/110276] New: [13 Regression] ICE building efibootguard on x86_64-linux-gnu doko at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2023-06-27 16:02 ` cvs-commit at gcc dot gnu.org
@ 2023-06-27 16:05 ` jamborm at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jamborm at gcc dot gnu.org @ 2023-06-27 16:05 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #6 from Martin Jambor <jamborm at gcc dot gnu.org> ---
Fixed on both master and the 13 branch.

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

end of thread, other threads:[~2023-06-27 16:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-16  5:13 [Bug ipa/110276] New: [13 Regression] ICE building efibootguard on x86_64-linux-gnu doko at gcc dot gnu.org
2023-06-16  8:36 ` [Bug ipa/110276] [13/14 " rguenth at gcc dot gnu.org
2023-06-16 13:48 ` jamborm at gcc dot gnu.org
2023-06-16 16:18 ` jamborm at gcc dot gnu.org
2023-06-20 16:17 ` cvs-commit at gcc dot gnu.org
2023-06-27 16:02 ` cvs-commit at gcc dot gnu.org
2023-06-27 16:05 ` 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).