public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/28305] New: GNAT bug when inlining instance of a generic subprogram
@ 2006-07-07 15:49 dewi dot daniels at silver-software dot com
2006-07-11 11:03 ` [Bug ada/28305] " laurent at guerby dot net
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: dewi dot daniels at silver-software dot com @ 2006-07-07 15:49 UTC (permalink / raw)
To: gcc-bugs
A GNAT bug is detected whenever pragma Inline is applied to an instance of a
generic subprogram and front-end inlining is activated (-gnatN). The problem
can be worked around by either applying the pragma Inline to the generic
subprogram declaration or deactivating front-end inlining.
The test case I used is as follows:
gcc -c -gnatN test.ads
generic
type T is private;
function A (Value : T) return T;
function A (Value : T) return T is
begin
return Value;
end A;
with A;
pragma Elaborate_All (A);
function Test is new A (Integer);
pragma Inline (Test);
--
Summary: GNAT bug when inlining instance of a generic subprogram
Product: gcc
Version: 3.4.5
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dewi dot daniels at silver-software dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28305
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/28305] GNAT bug when inlining instance of a generic subprogram
2006-07-07 15:49 [Bug ada/28305] New: GNAT bug when inlining instance of a generic subprogram dewi dot daniels at silver-software dot com
@ 2006-07-11 11:03 ` laurent at guerby dot net
2007-11-17 12:34 ` sam at rfc1149 dot net
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: laurent at guerby dot net @ 2006-07-11 11:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from laurent at guerby dot net 2006-07-11 11:03 -------
Confirmed on 4.0, 4.1 releases and HEAD.
gcc -c -gnatN test.ads
+===========================GNAT BUG DETECTED==============================+
| 4.0.3 (x86_64-unknown-linux-gnu) Program_Error sinput.adb:404 explicit raise|
| Error detected at a.adb:2:1 [test.ads:5:1] |
+===========================GNAT BUG DETECTED==============================+
| 4.1.1 (x86_64-unknown-linux-gnu) Program_Error sinput.adb:404 explicit raise|
| Error detected at a.adb:2:1 [test.ads:5:1] |
+===========================GNAT BUG DETECTED==============================+
| 4.2.0 20060627 (experimental) (x86_64-unknown-linux-gnu) Program_Error
sinput.adb:404 explicit raise|
| Error detected at a.adb:2:1 [test.ads:5:1] |
--
laurent at guerby dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-07-11 11:03:48
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28305
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/28305] GNAT bug when inlining instance of a generic subprogram
2006-07-07 15:49 [Bug ada/28305] New: GNAT bug when inlining instance of a generic subprogram dewi dot daniels at silver-software dot com
2006-07-11 11:03 ` [Bug ada/28305] " laurent at guerby dot net
@ 2007-11-17 12:34 ` sam at rfc1149 dot net
2007-11-25 14:19 ` sam at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: sam at rfc1149 dot net @ 2007-11-17 12:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from sam at rfc1149 dot net 2007-11-17 12:34 -------
Confirmed on 4.3.0 HEAD with a different (and strange) error message.
+===========================GNAT BUG DETECTED==============================+
| 4.3.0 20071114 (experimental) (i686-pc-linux-gnu) Program_Error
sinput.adb:403 Current_Task referenced in entry body|
| Error detected at a.adb:2:1 [test.ads:5:1] |
--
sam at rfc1149 dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sam at rfc1149 dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28305
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/28305] GNAT bug when inlining instance of a generic subprogram
2006-07-07 15:49 [Bug ada/28305] New: GNAT bug when inlining instance of a generic subprogram dewi dot daniels at silver-software dot com
2006-07-11 11:03 ` [Bug ada/28305] " laurent at guerby dot net
2007-11-17 12:34 ` sam at rfc1149 dot net
@ 2007-11-25 14:19 ` sam at gcc dot gnu dot org
2008-04-09 14:22 ` sam at gcc dot gnu dot org
2008-04-09 14:23 ` sam at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: sam at gcc dot gnu dot org @ 2007-11-25 14:19 UTC (permalink / raw)
To: gcc-bugs
--
sam at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |sam at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2006-07-11 11:03:48 |2007-11-25 14:19:24
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28305
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/28305] GNAT bug when inlining instance of a generic subprogram
2006-07-07 15:49 [Bug ada/28305] New: GNAT bug when inlining instance of a generic subprogram dewi dot daniels at silver-software dot com
` (2 preceding siblings ...)
2007-11-25 14:19 ` sam at gcc dot gnu dot org
@ 2008-04-09 14:22 ` sam at gcc dot gnu dot org
2008-04-09 14:23 ` sam at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: sam at gcc dot gnu dot org @ 2008-04-09 14:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from sam at gcc dot gnu dot org 2008-04-09 14:22 -------
Subject: Bug 28305
Author: sam
Date: Wed Apr 9 14:21:18 2008
New Revision: 134142
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=134142
Log:
gcc/ada/
PR ada/28305
* sem_ch6.adb (Build_Body_To_Inline): Do not save and restore
environment if generic instance is a top-level one.
gcc/testsuite/
PR ada/28305
* gnat.dg/specs/fe_inlining.ads, gnat.dg/specs/fe_inlining_helper.ads,
gnat.dg/specs/fe_inlining_helper.adb: New test.
Added:
trunk/gcc/testsuite/gnat.dg/specs/fe_inlining.ads
trunk/gcc/testsuite/gnat.dg/specs/fe_inlining_helper.adb
trunk/gcc/testsuite/gnat.dg/specs/fe_inlining_helper.ads
Modified:
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/sem_ch6.adb
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28305
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/28305] GNAT bug when inlining instance of a generic subprogram
2006-07-07 15:49 [Bug ada/28305] New: GNAT bug when inlining instance of a generic subprogram dewi dot daniels at silver-software dot com
` (3 preceding siblings ...)
2008-04-09 14:22 ` sam at gcc dot gnu dot org
@ 2008-04-09 14:23 ` sam at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: sam at gcc dot gnu dot org @ 2008-04-09 14:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from sam at gcc dot gnu dot org 2008-04-09 14:22 -------
Fixed in SVN trunk.
--
sam at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28305
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-04-09 14:23 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-07 15:49 [Bug ada/28305] New: GNAT bug when inlining instance of a generic subprogram dewi dot daniels at silver-software dot com
2006-07-11 11:03 ` [Bug ada/28305] " laurent at guerby dot net
2007-11-17 12:34 ` sam at rfc1149 dot net
2007-11-25 14:19 ` sam at gcc dot gnu dot org
2008-04-09 14:22 ` sam at gcc dot gnu dot org
2008-04-09 14:23 ` sam 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).