Bug 35645 - ICE in gimplify_expr, at gimplify.c:6120
Summary: ICE in gimplify_expr, at gimplify.c:6120
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: ada (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-invalid-code
Depends on:
Blocks:
 
Reported: 2008-03-20 00:38 UTC by Ludovic Brenta
Modified: 2010-11-27 19:20 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail: 4.1.2, 4.2.2, 4.3.0
Last reconfirmed: 2008-03-20 09:33:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ludovic Brenta 2008-03-20 00:38:28 UTC
Not sure the declaration below is legal, but it ICEs anyway.

package pak1 is
   type T1(x1: integer) is record
      x2: integer := T1.x1;
   end record;
end pak1;

gcc-4.1 -c pak1.ads
+===========================GNAT BUG DETECTED==============================+
| 4.1.3 20070518 (prerelease) (Debian 4.1.2-8) (x86_64-pc-linux-gnu) GCC error:|
| in gimplify_expr, at gimplify.c:4519                                     |
| No source file position information available                            |

+===========================GNAT BUG DETECTED==============================+
| 4.2.2 (i686-unknown-linux-gnu) in gimplify_expr, at gimplify.c:5888      |
| No source file position information available                            |

gcc-4.3 -c pak1.ads
+===========================GNAT BUG DETECTED==============================+
| 4.3.1 20080309 (prerelease) (x86_64-pc-linux-gnu) GCC error:             |
| in gimplify_expr, at gimplify.c:6120                                     |
| Error detected around pak1.ads:3                                         |
Comment 1 Richard Biener 2008-03-20 09:33:00 UTC
This means there is an unhandled tree in gimplify_expr, which is in this case
probably PLACEHOLDER_EXPR(?):

pak1.t1ip (_init, x1)
{
  _init.x1 = (integer) x1;
  _init.x2 = <PLACEHOLDER_EXPR struct pak1__t1>.x1;
  goto <D.509>;
  <D.509>:;
  return _init;
Comment 2 Samuel Tardieu 2008-05-14 09:20:53 UTC
The code is not legal, adding keyword
Comment 3 Eric Botcazou 2010-11-27 19:20:38 UTC
Fixed on the mainline.