public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/109881] New: GNAT BUG DETECTED during RTL pass, raised TYPES.UNRECOVERABLE_ERROR
@ 2023-05-16 22:26 gnugcc at marino dot st
2023-05-16 22:32 ` [Bug ada/109881] " gnugcc at marino dot st
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: gnugcc at marino dot st @ 2023-05-16 22:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109881
Bug ID: 109881
Summary: GNAT BUG DETECTED during RTL pass, raised
TYPES.UNRECOVERABLE_ERROR
Product: gcc
Version: 11.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
Assignee: unassigned at gcc dot gnu.org
Reporter: gnugcc at marino dot st
CC: dkm at gcc dot gnu.org
Target Milestone: ---
Created attachment 55096
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55096&action=edit
The three ada source files requested in the GNAT BUG message
During development, I hit this error on GCC 11.2.0 and also got a very similar
one on Community 2020 (Windows). It just happened so if a future change
resolves it, I'll reattach those source files.
during RTL pass: expand
+===========================GNAT BUG DETECTED==============================+
| 11.2.0 (x86_64-raven-dragonfly6.2) GCC error: |
| in operand_subword_force, at emit-rtl.c:1806 |
| Error detected around
/home/marino/rvn-format/src/zstandard/zstandard-streaming_decompression.adb:249:8|
| Please submit a bug report; see https://gcc.gnu.org/bugs/ . |
| Use a subject line meaningful to you and us to track the bug. |
| Include the entire contents of this bug box in the report. |
| Include the exact command that you entered. |
| Also include sources listed below. |
+==========================================================================+
Please include these source files with error report
Note that list may not be accurate in some cases,
so please double check that the problem can still
be reproduced with the set of files listed.
Consider also -gnatd.n switch (see debug.adb).
/home/marino/rvn-format/src/zstandard/zstandard-streaming_decompression.adb
zstandard/zstandard-streaming_decompression.ads
zstandard/zstandard.ads
raised TYPES.UNRECOVERABLE_ERROR : comperr.adb:407
commands that built it:
gcc -c unix/stat_opsc.c -o stat_opsc.o
PROG=/raven/share/raven/toolchain/ravensys-gcc/bin/gnatmake
${PROG} unrvn.adb -Izstandard -Iblake3 -Iunix -lzstd -largs -L/raven/lib
-lzstd_pic -lblake3_pic stat_opsc.o
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug ada/109881] GNAT BUG DETECTED during RTL pass, raised TYPES.UNRECOVERABLE_ERROR
2023-05-16 22:26 [Bug ada/109881] New: GNAT BUG DETECTED during RTL pass, raised TYPES.UNRECOVERABLE_ERROR gnugcc at marino dot st
@ 2023-05-16 22:32 ` gnugcc at marino dot st
2023-05-16 23:41 ` gnugcc at marino dot st
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: gnugcc at marino dot st @ 2023-05-16 22:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109881
--- Comment #1 from John Marino <gnugcc at marino dot st> ---
I commented out the "file_to_file_decompression" function and the GNAT BUG
disappeared.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug ada/109881] GNAT BUG DETECTED during RTL pass, raised TYPES.UNRECOVERABLE_ERROR
2023-05-16 22:26 [Bug ada/109881] New: GNAT BUG DETECTED during RTL pass, raised TYPES.UNRECOVERABLE_ERROR gnugcc at marino dot st
2023-05-16 22:32 ` [Bug ada/109881] " gnugcc at marino dot st
@ 2023-05-16 23:41 ` gnugcc at marino dot st
2023-05-18 8:48 ` ebotcazou at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: gnugcc at marino dot st @ 2023-05-16 23:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109881
--- Comment #2 from John Marino <gnugcc at marino dot st> ---
I found the problematic line.
I changed this line:
data_in := read_compressed_data (input_stream, planned, bytes_read);
to:
bytes_read := read_compressed_data (input_stream => input_stream,
bytes_planned => planned,
data_in => data_in);
and the read_compressed_data function was changed from:
function read_compressed_data
(input_stream : not null SIO.Stream_Access;
bytes_planned : Natural;
bytes_read : out Natural) return data_in_type;
to:
function read_compressed_data
(input_stream : not null SIO.Stream_Access;
bytes_planned : Natural;
data_in : out data_in_type) return Natural;
The rearrangement of the function avoided the GNAT bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug ada/109881] GNAT BUG DETECTED during RTL pass, raised TYPES.UNRECOVERABLE_ERROR
2023-05-16 22:26 [Bug ada/109881] New: GNAT BUG DETECTED during RTL pass, raised TYPES.UNRECOVERABLE_ERROR gnugcc at marino dot st
2023-05-16 22:32 ` [Bug ada/109881] " gnugcc at marino dot st
2023-05-16 23:41 ` gnugcc at marino dot st
@ 2023-05-18 8:48 ` ebotcazou at gcc dot gnu.org
2023-05-18 8:50 ` [Bug ada/109881] internal error on function returning dynamically-sized array ebotcazou at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2023-05-18 8:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109881
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2023-05-18
Status|UNCONFIRMED |NEW
CC| |ebotcazou at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #3 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Still present on the mainline:
/home/eric/install/gcc/lib64/gcc/x86_64-suse-linux/14.0.0/adainclude/s-stoele.adb:
In function 'Zstandard.Streaming_Decompression.Read_Compressed_Data':
/home/eric/install/gcc/lib64/gcc/x86_64-suse-linux/14.0.0/adainclude/s-stoele.adb:68:31:
error: definition in block 5 does not dominate use in block 12
for SSA_NAME: _48 in statement:
_16 = _48 & 18446744073709551608;
during GIMPLE pass: ssa
+===========================GNAT BUG DETECTED==============================+
| 14.0.0 20230515 (experimental) [master r14-815-gf2afe68a175]
(x86_64-suse-linux) GCC error:|
| verify_ssa failed
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug ada/109881] internal error on function returning dynamically-sized array
2023-05-16 22:26 [Bug ada/109881] New: GNAT BUG DETECTED during RTL pass, raised TYPES.UNRECOVERABLE_ERROR gnugcc at marino dot st
` (2 preceding siblings ...)
2023-05-18 8:48 ` ebotcazou at gcc dot gnu.org
@ 2023-05-18 8:50 ` ebotcazou at gcc dot gnu.org
2023-11-16 17:42 ` [Bug ada/109881] internal error on function returning dynamically-sized type ebotcazou at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2023-05-18 8:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109881
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |ebotcazou at gcc dot gnu.org
Status|NEW |ASSIGNED
--- Comment #4 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
I'll have a look.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug ada/109881] internal error on function returning dynamically-sized type
2023-05-16 22:26 [Bug ada/109881] New: GNAT BUG DETECTED during RTL pass, raised TYPES.UNRECOVERABLE_ERROR gnugcc at marino dot st
` (3 preceding siblings ...)
2023-05-18 8:50 ` [Bug ada/109881] internal error on function returning dynamically-sized array ebotcazou at gcc dot gnu.org
@ 2023-11-16 17:42 ` ebotcazou at gcc dot gnu.org
2023-11-16 17:43 ` ebotcazou at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2023-11-16 17:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109881
--- Comment #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
https://gcc.gnu.org/g:4d8b41bb0512947ce13636fc460ea9fb8dea419a
commit r14-5537-g4d8b41bb0512947ce13636fc460ea9fb8dea419a
Author: Eric Botcazou <ebotcazou@adacore.com>
Date: Thu Nov 16 18:36:44 2023 +0100
Fix internal error on function returning dynamically-sized type
This is a tree sharing issue for the internal return type synthesized for
a function returning a dynamically-sized type and taking an Out or In/Out
parameter passed by copy.
gcc/ada/
* gcc-interface/decl.cc (gnat_to_gnu_subprog_type): Also create a
TYPE_DECL for the return type built for the CI/CO mechanism.
gcc/testsuite/
* gnat.dg/varsize4.ads, gnat.dg/varsize4.adb: New test.
* gnat.dg/varsize4_pkg.ads: New helper.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug ada/109881] internal error on function returning dynamically-sized type
2023-05-16 22:26 [Bug ada/109881] New: GNAT BUG DETECTED during RTL pass, raised TYPES.UNRECOVERABLE_ERROR gnugcc at marino dot st
` (4 preceding siblings ...)
2023-11-16 17:42 ` [Bug ada/109881] internal error on function returning dynamically-sized type ebotcazou at gcc dot gnu.org
@ 2023-11-16 17:43 ` ebotcazou at gcc dot gnu.org
2023-11-16 17:43 ` ebotcazou at gcc dot gnu.org
2023-11-16 17:44 ` ebotcazou at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2023-11-16 17:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109881
--- Comment #6 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
https://gcc.gnu.org/g:c5e1cb7e501350ea339db44ca5a33704d817a6fb
commit r13-8075-gc5e1cb7e501350ea339db44ca5a33704d817a6fb
Author: Eric Botcazou <ebotcazou@adacore.com>
Date: Thu Nov 16 18:36:44 2023 +0100
Fix internal error on function returning dynamically-sized type
This is a tree sharing issue for the internal return type synthesized for
a function returning a dynamically-sized type and taking an Out or In/Out
parameter passed by copy.
gcc/ada/
* gcc-interface/decl.cc (gnat_to_gnu_subprog_type): Also create a
TYPE_DECL for the return type built for the CI/CO mechanism.
gcc/testsuite/
* gnat.dg/varsize4.ads, gnat.dg/varsize4.adb: New test.
* gnat.dg/varsize4_pkg.ads: New helper.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug ada/109881] internal error on function returning dynamically-sized type
2023-05-16 22:26 [Bug ada/109881] New: GNAT BUG DETECTED during RTL pass, raised TYPES.UNRECOVERABLE_ERROR gnugcc at marino dot st
` (5 preceding siblings ...)
2023-11-16 17:43 ` ebotcazou at gcc dot gnu.org
@ 2023-11-16 17:43 ` ebotcazou at gcc dot gnu.org
2023-11-16 17:44 ` ebotcazou at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2023-11-16 17:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109881
--- Comment #7 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
https://gcc.gnu.org/g:1865bca25e1d275853aed9f2780a300c6db8fd1c
commit r12-9985-g1865bca25e1d275853aed9f2780a300c6db8fd1c
Author: Eric Botcazou <ebotcazou@adacore.com>
Date: Thu Nov 16 18:36:44 2023 +0100
Fix internal error on function returning dynamically-sized type
This is a tree sharing issue for the internal return type synthesized for
a function returning a dynamically-sized type and taking an Out or In/Out
parameter passed by copy.
gcc/ada/
* gcc-interface/decl.cc (gnat_to_gnu_subprog_type): Also create a
TYPE_DECL for the return type built for the CI/CO mechanism.
gcc/testsuite/
* gnat.dg/varsize4.ads, gnat.dg/varsize4.adb: New test.
* gnat.dg/varsize4_pkg.ads: New helper.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug ada/109881] internal error on function returning dynamically-sized type
2023-05-16 22:26 [Bug ada/109881] New: GNAT BUG DETECTED during RTL pass, raised TYPES.UNRECOVERABLE_ERROR gnugcc at marino dot st
` (6 preceding siblings ...)
2023-11-16 17:43 ` ebotcazou at gcc dot gnu.org
@ 2023-11-16 17:44 ` ebotcazou at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2023-11-16 17:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109881
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |12.4
--- Comment #8 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Fixed on mainline and upcoming 13.x and 12.x releases.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-11-16 17:44 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-16 22:26 [Bug ada/109881] New: GNAT BUG DETECTED during RTL pass, raised TYPES.UNRECOVERABLE_ERROR gnugcc at marino dot st
2023-05-16 22:32 ` [Bug ada/109881] " gnugcc at marino dot st
2023-05-16 23:41 ` gnugcc at marino dot st
2023-05-18 8:48 ` ebotcazou at gcc dot gnu.org
2023-05-18 8:50 ` [Bug ada/109881] internal error on function returning dynamically-sized array ebotcazou at gcc dot gnu.org
2023-11-16 17:42 ` [Bug ada/109881] internal error on function returning dynamically-sized type ebotcazou at gcc dot gnu.org
2023-11-16 17:43 ` ebotcazou at gcc dot gnu.org
2023-11-16 17:43 ` ebotcazou at gcc dot gnu.org
2023-11-16 17:44 ` ebotcazou 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).