public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/50294] New: ICE in output_constructor_regular_field, at varasm.c:4751
@ 2011-09-05 13:42 rguenth at gcc dot gnu.org
  2011-09-05 14:00 ` [Bug ada/50294] " rguenth at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-09-05 13:42 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50294
           Summary: ICE in output_constructor_regular_field, at
                    varasm.c:4751
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, wrong-code
          Severity: normal
          Priority: P3
         Component: ada
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: rguenth@gcc.gnu.org
                CC: ebotcazou@gcc.gnu.org


A modified gnat.dg/loop_optimization3.adb, like below

-- { dg-do run }
-- { dg-options "-O" }

with Loop_Optimization3_Pkg; use Loop_Optimization3_Pkg;

procedure Loop_Optimization3 is

  type Unsigned_64_T is mod 2 ** 64;
  type Arr is array (Unsigned_64_T range 9223372036854775805 ..
9223372036854775811) of Integer;
  C : constant Arr := (1, others => F(2));

begin
  if C /= (1, 2, 2, 2, 2, 2, 2) then
    raise Program_Error;
  end if;
end;

ICEs like

> ./gnat1 -quiet loop_optimization3.adb 
loop_optimization3.adb:10:03: warning: "Storage_Error" will be raised at run
time
+===========================GNAT BUG DETECTED==============================+
| 4.7.0 20110905 (experimental) (x86_64-unknown-linux-gnu) GCC error:      |
| in output_constructor_regular_field, at varasm.c:4751                    |
| Error detected around loop_optimization3.adb:16:4                        |
| 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).                   |
+==========================================================================+


The program should either be rejected or should not ICE.

Emitting Storage_Error at runtime sounds odd as well for an array with
7 elements.  Thus, if the ICE is fixed the program will fail at runtime.


I run into exactly the same situation (well, not the ICE but the
Storage_Error) with the sizetype no-longer sign-extends for the
original loop_optimization3.adb testcase.

Thus the question - what should stor-layout do with domain types
that wrap the wrong way around (i.e. are of wrong type because Ada
turns everything into sizetype instead of [s]sizetype dependent on
the Ada type "signedness")?


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

end of thread, other threads:[~2012-05-26 13:33 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-05 13:42 [Bug ada/50294] New: ICE in output_constructor_regular_field, at varasm.c:4751 rguenth at gcc dot gnu.org
2011-09-05 14:00 ` [Bug ada/50294] " rguenth at gcc dot gnu.org
2011-09-05 14:07 ` rguenth at gcc dot gnu.org
2011-09-05 18:33 ` [Bug ada/50294] ICE in output_constructor_regular_field ebotcazou at gcc dot gnu.org
2011-09-06  8:32 ` rguenth at gcc dot gnu.org
2011-09-06  9:16 ` ebotcazou at gcc dot gnu.org
2011-09-06  9:53 ` rguenther at suse dot de
2011-09-06 10:22 ` ebotcazou at gcc dot gnu.org
2011-11-19 21:40 ` ebotcazou at gcc dot gnu.org
2011-11-19 21:40 ` ebotcazou at gcc dot gnu.org
2011-12-01  9:34 ` rguenther at suse dot de
2012-05-26 13:33 ` ebotcazou at gcc dot gnu.org
2012-05-26 13:37 ` ebotcazou 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).