Bug 24564 - Bug box in Ada compiler: in create_tmp_var, at gimplify.c:368
Summary: Bug box in Ada compiler: in create_tmp_var, at gimplify.c:368
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: ada (show other bugs)
Version: 4.0.1
: P2 normal
Target Milestone: 4.3.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on: 23427
Blocks:
  Show dependency treegraph
 
Reported: 2005-10-28 05:54 UTC by Scott McMillan
Modified: 2007-05-04 10:55 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-11-03 15:42:57


Attachments
Ada spec for the test case (250 bytes, text/plain)
2005-10-28 05:58 UTC, Scott McMillan
Details
Ada body for the test case (549 bytes, text/plain)
2005-10-28 05:59 UTC, Scott McMillan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Scott McMillan 2005-10-28 05:54:23 UTC
The following bug box is generated with the attched test case:

+===========================GNAT BUG DETECTED==============================+
| 4.0.1 (i686-pc-linux-gnu) in create_tmp_var, at gimplify.c:368           |
| Error detected at message_pool.adb:62:5                                  |
| Please submit a bug report; see http://gcc.gnu.org/bugs.html.            |
| Include the entire contents of this bug box in the report.               |
| Include the exact gcc or gnatmake command that you entered.              |
| Also include sources listed below in gnatchop format                     |
| (concatenated together with no headers between files).                   |
+==========================================================================+
Using built-in specs. 
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.
 
message_pool.adb
message_pool.ads
 
compilation abandoned
gnatmake: "message_pool.adb" compilation error

gcc version:

Target: i686-pc-linux-gnu
Configured with: /home/scott/gcc-4.0.1/gcc-4.0.1/configure --prefix=/usr/local/gcc-4.0.1 --enable-languages=c,c++,ada
Thread model: posix
gcc version 4.0.1

command line: /usr/local/gcc-4.0.1/bin/gnatmake -gnat05 message_pool.adb
gcc -c -gnat05 message_pool.adb

The code attached is reduce set of the code which originally uncovered the problem.  I have noticed that removing the Temp_Key variable allows the code to compile without error or warning.  In my original code this variable was necessary, in the test case it is only there to demonstrate the failure.
Comment 1 Scott McMillan 2005-10-28 05:58:06 UTC
Created attachment 10071 [details]
Ada spec for the test case
Comment 2 Scott McMillan 2005-10-28 05:59:13 UTC
Created attachment 10072 [details]
Ada body for the test case
Comment 3 Andrew Pinski 2005-11-01 22:34:10 UTC
On the mainline on x86_64 I get:
+===========================GNAT BUG DETECTED==============================+
| 4.1.0 20051031 (experimental) (x86_64-unknown-linux-gnu) GCC error:      |
| in tree_low_cst, at tree.c:4386                                          |
| Error detected at message_pool.adb:64:5                                  |
| Please submit a bug report; see http://gcc.gnu.org/bugs.html.            |
| 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 gcc or gnatmake command that you entered.              |
| Also include sources listed below in gnatchop format                     |
| (concatenated together with no headers between files).                   |
+==========================================================================+

Comment 4 Andrew Pinski 2005-11-01 22:37:52 UTC
The mainline issue looks like PR 23427.
Comment 5 Laurent GUERBY 2005-11-03 15:42:57 UTC
Confirmed on 4.0.2 and trunk.

+===========================GNAT BUG DETECTED==============================+
| 4.0.2 (i686-pc-linux-gnu) in tree_low_cst, at tree.c:3850                |
| Error detected at message_pool.adb:63:5                                  |

+===========================GNAT BUG DETECTED==============================+
| 4.1.0 20051102 (experimental) (i686-pc-linux-gnu) GCC error:             |
| in tree_low_cst, at tree.c:4386                                          |
| Error detected at message_pool.adb:63:5                                  |
Comment 6 Arnaud Charlet 2007-05-04 10:55:34 UTC
Fixed on trunk