public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/48012] New: The executable file hangs up by combination of controlled-type, generic, renames and Inline_Always
@ 2011-03-07  7:47 demoonlit at panathenaia dot halfmoon.jp
  2014-11-10 12:54 ` [Bug ada/48012] " fxcoudert at gcc dot gnu.org
  2014-11-10 14:19 ` charlet at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: demoonlit at panathenaia dot halfmoon.jp @ 2011-03-07  7:47 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: The executable file hangs up by combination of
                    controlled-type, generic, renames and Inline_Always
           Product: gcc
           Version: 4.5.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: demoonlit@panathenaia.halfmoon.jp


Created attachment 23564
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23564
minimal bug triggering source code

My application hangs up conpilied with gcc-4.5.2.

1. declare a controlled-type (named T) as private.
2. declare a generic function (named G) return T.
3. instantiate G.
4. declare a function (named F) renames it, and write pramga Inline_Always.
5. call F, it may hang up!

Probably, an object of T is attached to a finalization list, twice.

-- iacm.adb

with iact;
with iacp;
procedure iacm is
   X : iact.T := iacp.F; -- hang up !!
begin
    null;
end iacm;

-- iact.ads

with Ada.Finalization;
package iact is
   type T is private; -- hidden controll type
   generic function G return T;
private
   type T is new Ada.Finalization.Controlled with null record;
end iact;

-- iact.adb

package body iact is
   function G return T is
   begin
      return (Ada.Finalization.Controlled with null record);
   end G;
end iact;

-- iacp.ads

with iact;
package iacp is
   function F return  iact.T;
   pragma Inline_Always (F); -- this pragma causes hang up
private
   function G is new iact.G;
   function F return iact.T renames G;
end iacp;

% gnatmake iacm
gcc -c iacm.adb
gcc -c iacp.ads
gcc -c iact.adb
gnatbind -x iacm.ali
gnatlink iacm.ali

% ./iacm 
( hang up !! )


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

* [Bug ada/48012] The executable file hangs up by combination of controlled-type, generic, renames and Inline_Always
  2011-03-07  7:47 [Bug ada/48012] New: The executable file hangs up by combination of controlled-type, generic, renames and Inline_Always demoonlit at panathenaia dot halfmoon.jp
@ 2014-11-10 12:54 ` fxcoudert at gcc dot gnu.org
  2014-11-10 14:19 ` charlet at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2014-11-10 12:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48012

Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|i686-apple-darwin9          |
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-11-10
      Known to work|                            |5.0
               Host|i686-apple-darwin9          |
     Ever confirmed|0                           |1
      Known to fail|                            |4.5.2
              Build|i686-apple-darwin9          |

--- Comment #1 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Confirmed with GNATMAKE 4.4.7 20120313 (Red Hat 4.4.7-11) on x86_64-linux. Does
not occur anymore on trunk.


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

* [Bug ada/48012] The executable file hangs up by combination of controlled-type, generic, renames and Inline_Always
  2011-03-07  7:47 [Bug ada/48012] New: The executable file hangs up by combination of controlled-type, generic, renames and Inline_Always demoonlit at panathenaia dot halfmoon.jp
  2014-11-10 12:54 ` [Bug ada/48012] " fxcoudert at gcc dot gnu.org
@ 2014-11-10 14:19 ` charlet at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: charlet at gcc dot gnu.org @ 2014-11-10 14:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48012

Arnaud Charlet <charlet at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |charlet at gcc dot gnu.org
         Resolution|---                         |FIXED
   Target Milestone|---                         |5.0

--- Comment #2 from Arnaud Charlet <charlet at gcc dot gnu.org> ---
Closing.


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

end of thread, other threads:[~2014-11-10 14:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-07  7:47 [Bug ada/48012] New: The executable file hangs up by combination of controlled-type, generic, renames and Inline_Always demoonlit at panathenaia dot halfmoon.jp
2014-11-10 12:54 ` [Bug ada/48012] " fxcoudert at gcc dot gnu.org
2014-11-10 14:19 ` charlet 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).