public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/20590] New: returning record type with a default discriminant causes gnat bug box
@ 2005-03-22 16:20 fraser at blancolioni dot org
2005-03-22 16:31 ` [Bug ada/20590] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-06-15 3:12 ` pinskia at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: fraser at blancolioni dot org @ 2005-03-22 16:20 UTC (permalink / raw)
To: gcc-bugs
[fraser@kimba simplify-rtx]$ gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-languages=c,c++,objc,java,f95,ada
--enable-java-awt=gtk --host=x86_64-redhat-linux
Thread model: posix
gcc version 4.0.0 20050314 (Red Hat 4.0.0-0.34)
[fraser@kimba simplify-rtx]$ gcc -c bug.adb
+===========================GNAT BUG DETECTED==============================+
| 4.0.0 20050314 (Red Hat 4.0.0-0.34) (x86_64-redhat-linux-gnu) GCC error: |
| in simplify_subreg, at simplify-rtx.c:3671 |
| Error detected at bug.adb:6:14 |
| 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.
bug.adb
bug.ads
bug.adb:4:07: warning: "Result" is never assigned a value
compilation abandoned
[fraser@kimba simplify-rtx]$
-- bug.ads and bug.adb are as follows
package Bug is
type Record_Type (Class : Boolean := False) is
record
case Class is
when False =>
null;
when True =>
Kind : Integer;
end case;
end record;
function To_Record (Item : String) return Record_Type;
end Bug;
package body Bug is
function To_Record (Item : String) return Record_Type is
Result : Record_Type (True);
begin
return Result;
end To_Record;
end Bug;
-- Note: bug box only comes up if Record_Type has a default discriminant, and
one of the sizes is zero, and the return statement returns a variable that
specifies the value of th discriminant.
-- This is on a Fedore Core 3 x86_64 installation, upgraded via RPM to gcc-4.0.0
--
Summary: returning record type with a default discriminant causes
gnat bug box
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fraser at blancolioni dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: x86_64-redhat-linux
GCC target triplet: x86_64-redhat-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20590
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug ada/20590] [4.0/4.1 Regression] returning record type with a default discriminant causes gnat bug box
2005-03-22 16:20 [Bug ada/20590] New: returning record type with a default discriminant causes gnat bug box fraser at blancolioni dot org
@ 2005-03-22 16:31 ` pinskia at gcc dot gnu dot org
2005-06-15 3:12 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-22 16:31 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-22 16:30 -------
Confirmed on a slightly older 4.1.0. I cannot tell if this is a middle-end issue or an Ada front-end
issue.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |ice-on-valid-code
Last reconfirmed|0000-00-00 00:00:00 |2005-03-22 16:30:58
date| |
Summary|returning record type with a|[4.0/4.1 Regression]
|default discriminant causes |returning record type with a
|gnat bug box |default discriminant causes
| |gnat bug box
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20590
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug ada/20590] [4.0/4.1 Regression] returning record type with a default discriminant causes gnat bug box
2005-03-22 16:20 [Bug ada/20590] New: returning record type with a default discriminant causes gnat bug box fraser at blancolioni dot org
2005-03-22 16:31 ` [Bug ada/20590] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-06-15 3:12 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-15 3:12 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-15 03:12 -------
Fixed on the mainline (there are work arounds needed to get Ada front-end building there).
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20590
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-06-15 3:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-22 16:20 [Bug ada/20590] New: returning record type with a default discriminant causes gnat bug box fraser at blancolioni dot org
2005-03-22 16:31 ` [Bug ada/20590] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-06-15 3:12 ` pinskia at gcc dot gnu dot 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).