Ada front end Assert_Failure

Stephen Wilson wilsons@start.ca
Tue Feb 10 05:28:00 GMT 2009


Greetings!

An assertion was hit in the Ada front end.

Note that the test code (attached) is not semantically correct.
For me, the bug manifests in both 4.3.2 and the latest snapshot
4.4-20090206.

Configure options:
  --disable-multilib --enable-languages=c,ada

System type:
  $ uname -ro
  2.6.27.12-170.2.5.fc10.x86_64 GNU/Linux

Output:
  $ gcc -c bug.adb
  +===========================GNAT BUG DETECTED==============================+
  | 4.4.0 20090206 (experimental) (x86_64-unknown-linux-gnu) Assert_Failure sinfo.adb:1987|
  | Error detected at bug.adb:17:26                                          |
  | 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).                   |
  +==========================================================================+

  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.

Please let me know if further info is needed.

Thanks,
Steve
-------------- next part --------------

package Bug is

   function Foo return Integer;

end Bug;
-------------- next part --------------

package body Bug is

   function Bar (X : Integer) return Integer is
   begin
      return X;
   end Bar;

   type Ftype is access function (X : Integer) return Integer;

   function Jar return Ftype is
   begin
      return Bar'access;
   end Jar;

   function Foo return Integer is
      -- NOTE: Should be `Jar.all(0)' (or similar) to be valid.
      X : Integer := Jar.all;
   begin
      return X;
   end Foo;

end Bug;


More information about the Gcc-bugs mailing list