[Bug ada/109881] GNAT BUG DETECTED during RTL pass, raised TYPES.UNRECOVERABLE_ERROR

2023-05-18 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109881

Eric Botcazou  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  ---
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

[Bug ada/109881] GNAT BUG DETECTED during RTL pass, raised TYPES.UNRECOVERABLE_ERROR

2023-05-16 Thread gnugcc at marino dot st via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109881

--- Comment #2 from John Marino  ---
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.

[Bug ada/109881] GNAT BUG DETECTED during RTL pass, raised TYPES.UNRECOVERABLE_ERROR

2023-05-16 Thread gnugcc at marino dot st via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109881

--- Comment #1 from John Marino  ---
I commented out the "file_to_file_decompression" function and the GNAT BUG
disappeared.