public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/103928] New: [12] ICE in get_insn_template, at final.c:2050
@ 2022-01-06  9:01 manuel.lauss at googlemail dot com
  2022-01-06  9:12 ` [Bug target/103928] [12 Regression] " pinskia at gcc dot gnu.org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: manuel.lauss at googlemail dot com @ 2022-01-06  9:01 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103928
           Summary: [12] ICE in get_insn_template, at final.c:2050
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: manuel.lauss at googlemail dot com
  Target Milestone: ---

Created attachment 52132
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52132&action=edit
compressed unreduced preprocessed testfile

The attached unreduced testcase, extracted from xxHash, ICEs on trunk.
march=bdver4 seems essential to trigger it:

# gcc -O2 -march=bdver4 -E -o xxhash.i xxhash.c
# gcc -O2 -march=bdver4 -c xxhash.i
during RTL pass: final
In file included from xxhash.c:43:
xxhash.h: In function ‘XXH_mult64to128’:
xxhash.h:3360:1: internal compiler error: in get_insn_template, at final.c:2050
 3360 | }
      | ^
0x7f19cd0cd2b6 __libc_start_call_main
        ../sysdeps/nptl/libc_start_call_main.h:58
0x7f19cd0cd374 __libc_start_main_impl
        ../csu/libc-start.c:392
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.


gcc version 12.0.0 20220105 (experimental) (Gentoo 12.0.0_pre9999 p2, commit
4ce3bd7993bc8413197e07c4f54052e4ecaeccaa)

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

* [Bug target/103928] [12 Regression] ICE in get_insn_template, at final.c:2050
  2022-01-06  9:01 [Bug c/103928] New: [12] ICE in get_insn_template, at final.c:2050 manuel.lauss at googlemail dot com
@ 2022-01-06  9:12 ` pinskia at gcc dot gnu.org
  2022-01-06  9:45 ` jakub at gcc dot gnu.org
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-06  9:12 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.0

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

* [Bug target/103928] [12 Regression] ICE in get_insn_template, at final.c:2050
  2022-01-06  9:01 [Bug c/103928] New: [12] ICE in get_insn_template, at final.c:2050 manuel.lauss at googlemail dot com
  2022-01-06  9:12 ` [Bug target/103928] [12 Regression] " pinskia at gcc dot gnu.org
@ 2022-01-06  9:45 ` jakub at gcc dot gnu.org
  2022-01-06  9:58 ` marxin at gcc dot gnu.org
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-01-06  9:45 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

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

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Sorry, can't reproduce, neither with
r12-6221-ga4c2e62d60f47d47cdd94951e16b0de50495cdab nor with current trunk,
tried
-O2 -march=bdver4, -O2 -march=bdver4 -fpie and -O2 -march=bdver4 -fpie
-fstack-protector-strong -fstack-clash-protection just in case gentoo forces
some of those options by default.

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

* [Bug target/103928] [12 Regression] ICE in get_insn_template, at final.c:2050
  2022-01-06  9:01 [Bug c/103928] New: [12] ICE in get_insn_template, at final.c:2050 manuel.lauss at googlemail dot com
  2022-01-06  9:12 ` [Bug target/103928] [12 Regression] " pinskia at gcc dot gnu.org
  2022-01-06  9:45 ` jakub at gcc dot gnu.org
@ 2022-01-06  9:58 ` marxin at gcc dot gnu.org
  2022-01-06  9:59 ` manuel.lauss at googlemail dot com
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-01-06  9:58 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org
             Status|UNCONFIRMED                 |WAITING
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-01-06

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Please provide output of -v option, we should see all arguments passed to cc1.

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

* [Bug target/103928] [12 Regression] ICE in get_insn_template, at final.c:2050
  2022-01-06  9:01 [Bug c/103928] New: [12] ICE in get_insn_template, at final.c:2050 manuel.lauss at googlemail dot com
                   ` (2 preceding siblings ...)
  2022-01-06  9:58 ` marxin at gcc dot gnu.org
@ 2022-01-06  9:59 ` manuel.lauss at googlemail dot com
  2022-01-06 10:01 ` marxin at gcc dot gnu.org
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: manuel.lauss at googlemail dot com @ 2022-01-06  9:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Manuel Lauss <manuel.lauss at googlemail dot com> ---
You're right, I too can only reproduce it on the bdver4 machine itself, not on
e.g. a Zen or Haswell host.  I'll rebuild gcc-12 on the bdver4 host again.

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

* [Bug target/103928] [12 Regression] ICE in get_insn_template, at final.c:2050
  2022-01-06  9:01 [Bug c/103928] New: [12] ICE in get_insn_template, at final.c:2050 manuel.lauss at googlemail dot com
                   ` (3 preceding siblings ...)
  2022-01-06  9:59 ` manuel.lauss at googlemail dot com
@ 2022-01-06 10:01 ` marxin at gcc dot gnu.org
  2022-01-06 10:06 ` manuel.lauss at googlemail dot com
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-01-06 10:01 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Manuel Lauss from comment #3)
> You're right, I too can only reproduce it on the bdver4 machine itself, not
> on e.g. a Zen or Haswell host.  I'll rebuild gcc-12 on the bdver4 host again.

How do you build the compiler on the bdver4 host? Do you use -march=bdver4?

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

* [Bug target/103928] [12 Regression] ICE in get_insn_template, at final.c:2050
  2022-01-06  9:01 [Bug c/103928] New: [12] ICE in get_insn_template, at final.c:2050 manuel.lauss at googlemail dot com
                   ` (4 preceding siblings ...)
  2022-01-06 10:01 ` marxin at gcc dot gnu.org
@ 2022-01-06 10:06 ` manuel.lauss at googlemail dot com
  2022-01-06 10:08 ` marxin at gcc dot gnu.org
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: manuel.lauss at googlemail dot com @ 2022-01-06 10:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Manuel Lauss <manuel.lauss at googlemail dot com> ---
(In reply to Martin Liška from comment #4)
> (In reply to Manuel Lauss from comment #3)
> > You're right, I too can only reproduce it on the bdver4 machine itself, not
> > on e.g. a Zen or Haswell host.  I'll rebuild gcc-12 on the bdver4 host again.
> 
> How do you build the compiler on the bdver4 host? Do you use -march=bdver4?

Yes, -march=bdver4 -mtune=bdver4

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

* [Bug target/103928] [12 Regression] ICE in get_insn_template, at final.c:2050
  2022-01-06  9:01 [Bug c/103928] New: [12] ICE in get_insn_template, at final.c:2050 manuel.lauss at googlemail dot com
                   ` (5 preceding siblings ...)
  2022-01-06 10:06 ` manuel.lauss at googlemail dot com
@ 2022-01-06 10:08 ` marxin at gcc dot gnu.org
  2022-01-06 10:09 ` ubizjak at gmail dot com
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-01-06 10:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
Then you may be affected by PR103905 which is fixed on the current master.
Please pull to tip of master branch.

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

* [Bug target/103928] [12 Regression] ICE in get_insn_template, at final.c:2050
  2022-01-06  9:01 [Bug c/103928] New: [12] ICE in get_insn_template, at final.c:2050 manuel.lauss at googlemail dot com
                   ` (6 preceding siblings ...)
  2022-01-06 10:08 ` marxin at gcc dot gnu.org
@ 2022-01-06 10:09 ` ubizjak at gmail dot com
  2022-01-06 10:20 ` marxin at gcc dot gnu.org
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ubizjak at gmail dot com @ 2022-01-06 10:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Martin Liška from comment #6)
> Then you may be affected by PR103905 which is fixed on the current master.
> Please pull to tip of master branch.

No, bdver4 does not include XOP.

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

* [Bug target/103928] [12 Regression] ICE in get_insn_template, at final.c:2050
  2022-01-06  9:01 [Bug c/103928] New: [12] ICE in get_insn_template, at final.c:2050 manuel.lauss at googlemail dot com
                   ` (7 preceding siblings ...)
  2022-01-06 10:09 ` ubizjak at gmail dot com
@ 2022-01-06 10:20 ` marxin at gcc dot gnu.org
  2022-01-06 10:58 ` manuel.lauss at googlemail dot com
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-01-06 10:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Martin Liška <marxin at gcc dot gnu.org> ---
> No, bdver4 does not include XOP.

Ohh, didn't know that...

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

* [Bug target/103928] [12 Regression] ICE in get_insn_template, at final.c:2050
  2022-01-06  9:01 [Bug c/103928] New: [12] ICE in get_insn_template, at final.c:2050 manuel.lauss at googlemail dot com
                   ` (8 preceding siblings ...)
  2022-01-06 10:20 ` marxin at gcc dot gnu.org
@ 2022-01-06 10:58 ` manuel.lauss at googlemail dot com
  2022-01-06 12:02 ` manuel.lauss at googlemail dot com
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: manuel.lauss at googlemail dot com @ 2022-01-06 10:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Manuel Lauss <manuel.lauss at googlemail dot com> ---
(In reply to Uroš Bizjak from comment #7)
> (In reply to Martin Liška from comment #6)
> > Then you may be affected by PR103905 which is fixed on the current master.
> > Please pull to tip of master branch.
> 
> No, bdver4 does not include XOP.

Are you sure?  the XOP-version of "bextr" is used quite extensively, i.e.:
$ objdump -d /lib64/libc.so.6 | grep bextr
   35181:       8f ea f8 10 c9 03 1d    bextr  $0x1d03,%rcx,%rcx
   3beaa:       8f ea f8 10 f2 20 1f    bextr  $0x1f20,%rdx,%rsi
   3c207:       8f ea f8 10 c0 3f 01    bextr  $0x13f,%rax,%rax

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

* [Bug target/103928] [12 Regression] ICE in get_insn_template, at final.c:2050
  2022-01-06  9:01 [Bug c/103928] New: [12] ICE in get_insn_template, at final.c:2050 manuel.lauss at googlemail dot com
                   ` (9 preceding siblings ...)
  2022-01-06 10:58 ` manuel.lauss at googlemail dot com
@ 2022-01-06 12:02 ` manuel.lauss at googlemail dot com
  2022-01-06 16:50 ` ubizjak at gmail dot com
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: manuel.lauss at googlemail dot com @ 2022-01-06 12:02 UTC (permalink / raw)
  To: gcc-bugs

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

Manuel Lauss <manuel.lauss at googlemail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|WAITING                     |RESOLVED

--- Comment #10 from Manuel Lauss <manuel.lauss at googlemail dot com> ---
I tried the testcase of PR103905, and it works (no error/abort although it has
the XOP vector instructions in it).

Rebuilt current gcc-12 head with "-mno-xop" added to cflags, and disabled PGO
build; the error does no longer reproduce now.
So it was either fixed in trunk in the last 20 hours, or pgo build broke gcc,
or "-mno-xop" fixed it.

I'll try to narrow it down.

Resolving as invalid.

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

* [Bug target/103928] [12 Regression] ICE in get_insn_template, at final.c:2050
  2022-01-06  9:01 [Bug c/103928] New: [12] ICE in get_insn_template, at final.c:2050 manuel.lauss at googlemail dot com
                   ` (10 preceding siblings ...)
  2022-01-06 12:02 ` manuel.lauss at googlemail dot com
@ 2022-01-06 16:50 ` ubizjak at gmail dot com
  2022-01-06 17:02 ` ubizjak at gmail dot com
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ubizjak at gmail dot com @ 2022-01-06 16:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Martin Liška from comment #8)
> > No, bdver4 does not include XOP.
> 
> Ohh, didn't know that...

Sorry, I was wrong:

  {"bdver4", PROCESSOR_BDVER4, CPU_BDVER4,
    PTA_64BIT | PTA_MMX | PTA_SSE | PTA_SSE2 | PTA_SSE3
      | PTA_SSE4A | PTA_CX16 | PTA_ABM | PTA_SSSE3 | PTA_SSE4_1
      | PTA_SSE4_2 | PTA_AES | PTA_PCLMUL | PTA_AVX | PTA_AVX2
      | PTA_FMA4 | PTA_XOP | PTA_LWP | PTA_BMI | PTA_BMI2
      | PTA_TBM | PTA_F16C | PTA_FMA | PTA_PRFCHW | PTA_FXSR
      | PTA_XSAVE | PTA_XSAVEOPT | PTA_FSGSBASE | PTA_RDRND
      | PTA_MOVBE | PTA_MWAITX,

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

* [Bug target/103928] [12 Regression] ICE in get_insn_template, at final.c:2050
  2022-01-06  9:01 [Bug c/103928] New: [12] ICE in get_insn_template, at final.c:2050 manuel.lauss at googlemail dot com
                   ` (11 preceding siblings ...)
  2022-01-06 16:50 ` ubizjak at gmail dot com
@ 2022-01-06 17:02 ` ubizjak at gmail dot com
  2022-01-06 18:53 ` manuel.lauss at googlemail dot com
  2022-01-06 21:26 ` pinskia at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: ubizjak at gmail dot com @ 2022-01-06 17:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Manuel Lauss from comment #10)
> So it was either fixed in trunk in the last 20 hours, or pgo build broke
> gcc, or "-mno-xop" fixed it.

The fix for PR103905 was pushed to the master in the last 20 hours, and I am
curious if it has any effect on your problem.

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

* [Bug target/103928] [12 Regression] ICE in get_insn_template, at final.c:2050
  2022-01-06  9:01 [Bug c/103928] New: [12] ICE in get_insn_template, at final.c:2050 manuel.lauss at googlemail dot com
                   ` (12 preceding siblings ...)
  2022-01-06 17:02 ` ubizjak at gmail dot com
@ 2022-01-06 18:53 ` manuel.lauss at googlemail dot com
  2022-01-06 21:26 ` pinskia at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: manuel.lauss at googlemail dot com @ 2022-01-06 18:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Manuel Lauss <manuel.lauss at googlemail dot com> ---
(In reply to Uroš Bizjak from comment #12)
> (In reply to Manuel Lauss from comment #10)
> > So it was either fixed in trunk in the last 20 hours, or pgo build broke
> > gcc, or "-mno-xop" fixed it.
> 
> The fix for PR103905 was pushed to the master in the last 20 hours, and I am
> curious if it has any effect on your problem.

I believe it fixed it.  GCC itself was corrupted when built with XOP
instructions, as were a few other system packages.  This is all gone now.

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

* [Bug target/103928] [12 Regression] ICE in get_insn_template, at final.c:2050
  2022-01-06  9:01 [Bug c/103928] New: [12] ICE in get_insn_template, at final.c:2050 manuel.lauss at googlemail dot com
                   ` (13 preceding siblings ...)
  2022-01-06 18:53 ` manuel.lauss at googlemail dot com
@ 2022-01-06 21:26 ` pinskia at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-06 21:26 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|INVALID                     |DUPLICATE

--- Comment #14 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Just to record what this was in the end as a dup of bug 103905.

*** This bug has been marked as a duplicate of bug 103905 ***

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

end of thread, other threads:[~2022-01-06 21:26 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-06  9:01 [Bug c/103928] New: [12] ICE in get_insn_template, at final.c:2050 manuel.lauss at googlemail dot com
2022-01-06  9:12 ` [Bug target/103928] [12 Regression] " pinskia at gcc dot gnu.org
2022-01-06  9:45 ` jakub at gcc dot gnu.org
2022-01-06  9:58 ` marxin at gcc dot gnu.org
2022-01-06  9:59 ` manuel.lauss at googlemail dot com
2022-01-06 10:01 ` marxin at gcc dot gnu.org
2022-01-06 10:06 ` manuel.lauss at googlemail dot com
2022-01-06 10:08 ` marxin at gcc dot gnu.org
2022-01-06 10:09 ` ubizjak at gmail dot com
2022-01-06 10:20 ` marxin at gcc dot gnu.org
2022-01-06 10:58 ` manuel.lauss at googlemail dot com
2022-01-06 12:02 ` manuel.lauss at googlemail dot com
2022-01-06 16:50 ` ubizjak at gmail dot com
2022-01-06 17:02 ` ubizjak at gmail dot com
2022-01-06 18:53 ` manuel.lauss at googlemail dot com
2022-01-06 21:26 ` pinskia 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).