public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/53766] New: ICE in build_binary_op when using pragma Suppress (All_Checks)
@ 2012-06-25 10:36 baldrick at gcc dot gnu.org
  2012-06-27 10:39 ` [Bug ada/53766] ICE in build_binary_op on Max_Size_In_Storage_Elements with -gnatp ebotcazou at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: baldrick at gcc dot gnu.org @ 2012-06-25 10:36 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53766

             Bug #: 53766
           Summary: ICE in build_binary_op when using pragma Suppress
                    (All_Checks)
    Classification: Unclassified
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: baldrick@gcc.gnu.org


At a guess, the code that inserts runtime checks adds a need type conversion
that is forgotten when checks are suppressed.  I see this with gcc-4.7 and
with mainline.

$ gcc-4.8 -c p.adb
+===========================GNAT BUG DETECTED==============================+
| 4.8.0 20120624 (experimental) (x86_64-unknown-linux-gnu) GCC error:      |
| in build_binary_op, at ada/gcc-interface/utils2.c:1134                   |
| Error detected at p.adb:7:57                                             |
| 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.
Consider also -gnatd.n switch (see debug.adb).

p.adb
p.ads

compilation abandoned

-- chop here --

with System.Storage_Elements;
package P is
   procedure A (Offset : System.Storage_Elements.Storage_Offset);
end;

with Ada.Strings.Unbounded;
package body P is
   use System.Storage_Elements;
   procedure A (Offset : Storage_Offset) is
      pragma Suppress (All_Checks);
   begin
      if Offset +
Ada.Strings.Unbounded.Unbounded_String'Max_Size_In_Storage_Elements >= 123 then
         raise Program_Error;
      end if;
   end;
end;


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-12-15 20:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-25 10:36 [Bug ada/53766] New: ICE in build_binary_op when using pragma Suppress (All_Checks) baldrick at gcc dot gnu.org
2012-06-27 10:39 ` [Bug ada/53766] ICE in build_binary_op on Max_Size_In_Storage_Elements with -gnatp ebotcazou at gcc dot gnu.org
2012-12-15 18:12 ` ebotcazou at gcc dot gnu.org
2012-12-15 18:13 ` [Bug ada/53766] [4.7/4.8 regression] " ebotcazou at gcc dot gnu.org
2012-12-15 18:16 ` ebotcazou at gcc dot gnu.org
2012-12-15 18:17 ` ebotcazou at gcc dot gnu.org
2012-12-15 20:04 ` baldrick at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).