Bug 17921 - ICE on legal code: using the address of an array component
Summary: ICE on legal code: using the address of an array component
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: ada (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.0.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2004-10-10 12:37 UTC by duncan.sands@free.fr
Modified: 2005-01-02 15:55 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2004-10-29 14:09:21


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description duncan.sands@free.fr 2004-10-10 12:37:39 UTC
$ gcc -c b.ads 
b.ads: In function 'B._Elabs': 
b.ads:1: error: Invalid operand to unary operator 
D.399 
 
+===========================GNAT BUG DETECTED==============================+ 
| 4.0.0 20041005 (experimental) (i686-pc-linux-gnu) verify_stmts failed.   | 
| No source file position information available                            | 
| 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).                   | 
+==========================================================================+ 
 
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. 
 
b.ads 
 
compilation abandoned 
 
---chop here--- 
package B is 
   An_Array : array (Boolean) of Character; 
   An_Object : Character; 
   for An_Object'Address use An_Array (True)'Address; 
   pragma Import (Ada, An_Object); 
end B;
Comment 1 Andrew Pinski 2004-10-10 14:26:49 UTC
  D.351 = (system__address *) &(SIGNED_32) D.359;

Confirmed, looks like a front-end problem, it should have made a temprary variable to hold the value 
and then taken the address.
Comment 2 baldrick@free.fr 2005-01-02 14:26:28 UTC
(In reply to comment #1) 
>   D.351 = (system__address *) &(SIGNED_32) D.359; 
>  
> Confirmed, looks like a front-end problem, it should have made a temprary 
variable to hold the value  
> and then taken the address. 
 
The ICE no longer occurs with current CVS. 
Comment 3 Andrew Pinski 2005-01-02 15:55:04 UTC
Fixed.