* [Bug target/115608] ICE in extract_insn, at recog.cc:2812 when building with -mv8plus
2024-06-24 6:40 [Bug target/115608] New: ICE in extract_insn, at recog.cc:2812 when building with -mv8plus glaubitz at physik dot fu-berlin.de
@ 2024-06-24 6:47 ` pinskia at gcc dot gnu.org
2024-06-24 6:51 ` pinskia at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-06-24 6:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115608
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note -fPIE is needed to get the ICE in this case.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/115608] ICE in extract_insn, at recog.cc:2812 when building with -mv8plus
2024-06-24 6:40 [Bug target/115608] New: ICE in extract_insn, at recog.cc:2812 when building with -mv8plus glaubitz at physik dot fu-berlin.de
2024-06-24 6:47 ` [Bug target/115608] " pinskia at gcc dot gnu.org
@ 2024-06-24 6:51 ` pinskia at gcc dot gnu.org
2024-06-24 7:56 ` ebotcazou at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-06-24 6:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115608
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target|sparc-linux-gnu |sparc64-linux-gnu
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
/* V8PLUS requires V9 and makes no sense in 64-bit mode. */
if (!TARGET_V9 || TARGET_ARCH64)
target_flags &= ~MASK_V8PLUS;
Basically for sparc64, -mv8plus should have been a no-op ...
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/115608] ICE in extract_insn, at recog.cc:2812 when building with -mv8plus
2024-06-24 6:40 [Bug target/115608] New: ICE in extract_insn, at recog.cc:2812 when building with -mv8plus glaubitz at physik dot fu-berlin.de
2024-06-24 6:47 ` [Bug target/115608] " pinskia at gcc dot gnu.org
2024-06-24 6:51 ` pinskia at gcc dot gnu.org
@ 2024-06-24 7:56 ` ebotcazou at gcc dot gnu.org
2024-06-24 10:16 ` glaubitz at physik dot fu-berlin.de
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2024-06-24 7:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115608
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2024-06-24
Ever confirmed|0 |1
Status|UNCONFIRMED |WAITING
--- Comment #3 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
You always need to specify how the compiler has been configured.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/115608] ICE in extract_insn, at recog.cc:2812 when building with -mv8plus
2024-06-24 6:40 [Bug target/115608] New: ICE in extract_insn, at recog.cc:2812 when building with -mv8plus glaubitz at physik dot fu-berlin.de
` (2 preceding siblings ...)
2024-06-24 7:56 ` ebotcazou at gcc dot gnu.org
@ 2024-06-24 10:16 ` glaubitz at physik dot fu-berlin.de
2024-06-24 16:49 ` ebotcazou at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: glaubitz at physik dot fu-berlin.de @ 2024-06-24 10:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115608
--- Comment #4 from John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> ---
(In reply to Eric Botcazou from comment #3)
> You always need to specify how the compiler has been configured.
Here you go:
(sid_sparc64-dchroot)glaubitz@stadler:~$ gcc-14 -v
Using built-in specs.
COLLECT_GCC=gcc-14
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/sparc64-linux-gnu/14/lto-wrapper
Target: sparc64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 14.1.0-2'
--with-bugurl=file:///usr/share/doc/gcc-14/README.Bugs
--enable-languages=c,ada,c++,go,fortran,objc,obj-c++,m2,rust --prefix=/usr
--with-gcc-major-version-only --program-suffix=-14
--program-prefix=sparc64-linux-gnu- --enable-shared --enable-linker-build-id
--libexecdir=/usr/libexec --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-libstdcxx-backtrace
--enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support
--enable-plugin --enable-default-pie --with-system-zlib --enable-objc-gc=auto
--enable-multiarch --disable-werror --with-cpu-32=ultrasparc
--enable-targets=all --with-long-double-128 --enable-multilib
--enable-checking=release --build=sparc64-linux-gnu --host=sparc64-linux-gnu
--target=sparc64-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.1.0 (Debian 14.1.0-2)
(sid_sparc64-dchroot)glaubitz@stadler:~$
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/115608] ICE in extract_insn, at recog.cc:2812 when building with -mv8plus
2024-06-24 6:40 [Bug target/115608] New: ICE in extract_insn, at recog.cc:2812 when building with -mv8plus glaubitz at physik dot fu-berlin.de
` (3 preceding siblings ...)
2024-06-24 10:16 ` glaubitz at physik dot fu-berlin.de
@ 2024-06-24 16:49 ` ebotcazou at gcc dot gnu.org
2024-06-24 16:51 ` glaubitz at physik dot fu-berlin.de
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2024-06-24 16:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115608
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
--- Comment #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Tentative fix:
diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h
index 1e2e4aef2ad..83e0d6874d9 100644
--- a/gcc/config/sparc/linux64.h
+++ b/gcc/config/sparc/linux64.h
@@ -162,7 +162,7 @@ extern const char *host_detect_local_cpu (int argc, const
char **argv);
"%{m32:%{m64:%emay not use both -m32 and -m64}} \
%{m32:-mptr32 -mno-stack-bias %{!mlong-double-128:-mlong-double-64} \
%{!mcpu*:-mcpu=cypress}} \
-%{mv8plus:-mptr32 -mno-stack-bias %{!mlong-double-128:-mlong-double-64} \
+%{mv8plus:-m32 -mptr32 -mno-stack-bias %{!mlong-double-128:-mlong-double-64} \
%{!mcpu*:-mcpu=v9}} \
%{!m32:%{!mcpu*:-mcpu=ultrasparc}} \
%{!mno-vis:%{!m32:%{!mcpu=v9:-mvis}}}"
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/115608] ICE in extract_insn, at recog.cc:2812 when building with -mv8plus
2024-06-24 6:40 [Bug target/115608] New: ICE in extract_insn, at recog.cc:2812 when building with -mv8plus glaubitz at physik dot fu-berlin.de
` (4 preceding siblings ...)
2024-06-24 16:49 ` ebotcazou at gcc dot gnu.org
@ 2024-06-24 16:51 ` glaubitz at physik dot fu-berlin.de
2024-06-24 17:02 ` ebotcazou at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: glaubitz at physik dot fu-berlin.de @ 2024-06-24 16:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115608
--- Comment #6 from John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> ---
(In reply to Eric Botcazou from comment #5)
> Tentative fix:
>
> diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h
> index 1e2e4aef2ad..83e0d6874d9 100644
> --- a/gcc/config/sparc/linux64.h
> +++ b/gcc/config/sparc/linux64.h
> @@ -162,7 +162,7 @@ extern const char *host_detect_local_cpu (int argc,
> const char **argv);
> "%{m32:%{m64:%emay not use both -m32 and -m64}} \
> %{m32:-mptr32 -mno-stack-bias %{!mlong-double-128:-mlong-double-64} \
> %{!mcpu*:-mcpu=cypress}} \
> -%{mv8plus:-mptr32 -mno-stack-bias %{!mlong-double-128:-mlong-double-64} \
> +%{mv8plus:-m32 -mptr32 -mno-stack-bias
> %{!mlong-double-128:-mlong-double-64} \
> %{!mcpu*:-mcpu=v9}} \
> %{!m32:%{!mcpu*:-mcpu=ultrasparc}} \
> %{!mno-vis:%{!m32:%{!mcpu=v9:-mvis}}}"
Indeed, passing -m32 on the command line as well fixes the problem.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/115608] ICE in extract_insn, at recog.cc:2812 when building with -mv8plus
2024-06-24 6:40 [Bug target/115608] New: ICE in extract_insn, at recog.cc:2812 when building with -mv8plus glaubitz at physik dot fu-berlin.de
` (5 preceding siblings ...)
2024-06-24 16:51 ` glaubitz at physik dot fu-berlin.de
@ 2024-06-24 17:02 ` ebotcazou at gcc dot gnu.org
2024-06-25 9:50 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2024-06-24 17:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115608
--- Comment #7 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Right, but Solaris does it automatically so Linux can probably mimic it.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/115608] ICE in extract_insn, at recog.cc:2812 when building with -mv8plus
2024-06-24 6:40 [Bug target/115608] New: ICE in extract_insn, at recog.cc:2812 when building with -mv8plus glaubitz at physik dot fu-berlin.de
` (6 preceding siblings ...)
2024-06-24 17:02 ` ebotcazou at gcc dot gnu.org
@ 2024-06-25 9:50 ` cvs-commit at gcc dot gnu.org
2024-06-25 9:50 ` cvs-commit at gcc dot gnu.org
2024-06-25 9:52 ` ebotcazou at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-06-25 9:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115608
--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Eric Botcazou <ebotcazou@gcc.gnu.org>:
https://gcc.gnu.org/g:d4db77ce37a65207baea88859fd9c191469187f8
commit r15-1608-gd4db77ce37a65207baea88859fd9c191469187f8
Author: Eric Botcazou <ebotcazou@adacore.com>
Date: Tue Jun 25 11:47:48 2024 +0200
SPARC: fix internal error with -mv8plus on 64-bit Linux
This passes -m32 when -mv8plus is specified on Linux (like on Solaris).
gcc/
PR target/115608
* config/sparc/linux64.h (CC1_SPEC): Pass -m32 for -mv8plus.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/115608] ICE in extract_insn, at recog.cc:2812 when building with -mv8plus
2024-06-24 6:40 [Bug target/115608] New: ICE in extract_insn, at recog.cc:2812 when building with -mv8plus glaubitz at physik dot fu-berlin.de
` (7 preceding siblings ...)
2024-06-25 9:50 ` cvs-commit at gcc dot gnu.org
@ 2024-06-25 9:50 ` cvs-commit at gcc dot gnu.org
2024-06-25 9:52 ` ebotcazou at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-06-25 9:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115608
--- Comment #9 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Eric Botcazou
<ebotcazou@gcc.gnu.org>:
https://gcc.gnu.org/g:4bf93fc3d360dbeb5c07303c1b5028989c575ac1
commit r14-10345-g4bf93fc3d360dbeb5c07303c1b5028989c575ac1
Author: Eric Botcazou <ebotcazou@adacore.com>
Date: Tue Jun 25 11:47:48 2024 +0200
SPARC: fix internal error with -mv8plus on 64-bit Linux
This passes -m32 when -mv8plus is specified on Linux (like on Solaris).
gcc/
PR target/115608
* config/sparc/linux64.h (CC1_SPEC): Pass -m32 for -mv8plus.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/115608] ICE in extract_insn, at recog.cc:2812 when building with -mv8plus
2024-06-24 6:40 [Bug target/115608] New: ICE in extract_insn, at recog.cc:2812 when building with -mv8plus glaubitz at physik dot fu-berlin.de
` (8 preceding siblings ...)
2024-06-25 9:50 ` cvs-commit at gcc dot gnu.org
@ 2024-06-25 9:52 ` ebotcazou at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2024-06-25 9:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115608
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |14.2
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #10 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Probably 20 years too late, but thanks for reporting the problem. ;-)
^ permalink raw reply [flat|nested] 11+ messages in thread