public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/51940] New: Ada.Finalization of passed function return value skipped if exception raised in routine
@ 2012-01-22 10:19 garynot at comcast dot net
  2012-01-22 22:22 ` [Bug ada/51940] " ebotcazou at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: garynot at comcast dot net @ 2012-01-22 10:19 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51940
           Summary: Ada.Finalization of passed function return value
                    skipped if exception raised in routine
    Classification: Unclassified
           Product: gcc
           Version: 4.5.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: garynot@comcast.net


Created attachment 26409
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26409
Sample failing program.  Very simple code.

When a finalizable value is returned as a function result and passed to a
routine, if that routine terminates with an exception then the Finalization
routine is not called on the function result.  The value thus escapes from
finalization control when it should not.

gcc -c -gnata -gnatE -fstack-check -gnatef -gnatf -gnatm50 -gnatn -gnato
-gnatwe -gnatwi -gnatwj -gnatwK -gnatwl -Wuninitialized -gnatVa
-pass-exit-codes -O -g -I- -gnatA /home/geb/foo.gnat.bug4/pb_code_main.adb
gnatbind -E -m50 -Sin -static -we -I- -x
/home/geb/foo.gnat.bug4/pb_code_main.ali
gnatlink /home/geb/foo.gnat.bug4/pb_code_main.ali -g -v -o
/home/geb/foo.gnat.bug4/pb_code_main
./pb_code_main

Initialize 3216937700 0
Value'Address 3216937700 0
---0---- 0
Adjust 3216937680 0
A'Address 3216937680 1
Finalize 3216937680 1
---1---- 0
Adjust 3216936828 0
X'Address 3216936828 1
Adjust 134716096 1
Finalize 3216936828 2
Adjust 3216937668 1
Finalize 134716096 2
B'Address 3216937668 1
Finalize 3216937668 1
---2---- 0
Adjust 3216936828 0
X'Address 3216936828 1
Adjust 134716096 1
Finalize 3216936828 2
Y'Address 134716096 1
**Notice lack of Finalization call on Y**
---3---- => 1
Adjust 3216936828 1
X'Address 3216936828 2
Adjust 134716096 2
Finalize 3216936828 3
Y'Address 134716096 2
**Notice lack of Finalization call on Y**
**Notice That both Y's have same address, so Y was deallocated or reused
without Finalization**
---4---- => 2
---5---- 2
Finalize 3216937700 2


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

* [Bug ada/51940] Ada.Finalization of passed function return value skipped if exception raised in routine
  2012-01-22 10:19 [Bug ada/51940] New: Ada.Finalization of passed function return value skipped if exception raised in routine garynot at comcast dot net
@ 2012-01-22 22:22 ` ebotcazou at gcc dot gnu.org
  2012-01-23  1:49 ` garynot at comcast dot net
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2012-01-22 22:22 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2012-01-22
                 CC|                            |ebotcazou at gcc dot
                   |                            |gnu.org
     Ever Confirmed|0                           |1

--- Comment #1 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-01-22 21:57:04 UTC ---
I cannot reproduce.  Can you post the output of 'gcc -v' and the gnatmake
command you use (and remove all the useless switches if possible)?


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

* [Bug ada/51940] Ada.Finalization of passed function return value skipped if exception raised in routine
  2012-01-22 10:19 [Bug ada/51940] New: Ada.Finalization of passed function return value skipped if exception raised in routine garynot at comcast dot net
  2012-01-22 22:22 ` [Bug ada/51940] " ebotcazou at gcc dot gnu.org
@ 2012-01-23  1:49 ` garynot at comcast dot net
  2012-01-23  9:27 ` ebotcazou at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: garynot at comcast dot net @ 2012-01-23  1:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Gary Barnes <garynot at comcast dot net> 2012-01-23 00:23:31 UTC ---
Created attachment 26418
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26418
gcc -v output, gnat make command, copy of the .gpr file


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

* [Bug ada/51940] Ada.Finalization of passed function return value skipped if exception raised in routine
  2012-01-22 10:19 [Bug ada/51940] New: Ada.Finalization of passed function return value skipped if exception raised in routine garynot at comcast dot net
  2012-01-22 22:22 ` [Bug ada/51940] " ebotcazou at gcc dot gnu.org
  2012-01-23  1:49 ` garynot at comcast dot net
@ 2012-01-23  9:27 ` ebotcazou at gcc dot gnu.org
  2012-01-24  7:46 ` garynot at comcast dot net
  2012-01-24  8:05 ` ebotcazou at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2012-01-23  9:27 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |INVALID

--- Comment #3 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-01-23 08:19:35 UTC ---
This is GNAT GPL so you need to report this to AdaCore instead.


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

* [Bug ada/51940] Ada.Finalization of passed function return value skipped if exception raised in routine
  2012-01-22 10:19 [Bug ada/51940] New: Ada.Finalization of passed function return value skipped if exception raised in routine garynot at comcast dot net
                   ` (2 preceding siblings ...)
  2012-01-23  9:27 ` ebotcazou at gcc dot gnu.org
@ 2012-01-24  7:46 ` garynot at comcast dot net
  2012-01-24  8:05 ` ebotcazou at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: garynot at comcast dot net @ 2012-01-24  7:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Gary Barnes <garynot at comcast dot net> 2012-01-24 06:05:59 UTC ---
How do I report it to AdaCore?  Their web site has lots of marketing stuff but
nothing about reporting bugs.  Ditto for the Libre site.

So there are two GNAT's in the world?  Do they ever crosspollenate?  Is the GCC
GNAT more reliable?


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

* [Bug ada/51940] Ada.Finalization of passed function return value skipped if exception raised in routine
  2012-01-22 10:19 [Bug ada/51940] New: Ada.Finalization of passed function return value skipped if exception raised in routine garynot at comcast dot net
                   ` (3 preceding siblings ...)
  2012-01-24  7:46 ` garynot at comcast dot net
@ 2012-01-24  8:05 ` ebotcazou at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2012-01-24  8:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-01-24 07:44:15 UTC ---
> How do I report it to AdaCore?  Their web site has lots of marketing stuff but
> nothing about reporting bugs.  Ditto for the Libre site.

See the 'Contact' menu on the Libre site.

> So there are two GNAT's in the world?  Do they ever crosspollenate?  Is the GCC
> GNAT more reliable?

There is only one GNAT, the GNU Ada Translator, of which different versions are
released by different organizations.  'gcc -v' should be sufficient to identify
the version.


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

end of thread, other threads:[~2012-01-24  7:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-22 10:19 [Bug ada/51940] New: Ada.Finalization of passed function return value skipped if exception raised in routine garynot at comcast dot net
2012-01-22 22:22 ` [Bug ada/51940] " ebotcazou at gcc dot gnu.org
2012-01-23  1:49 ` garynot at comcast dot net
2012-01-23  9:27 ` ebotcazou at gcc dot gnu.org
2012-01-24  7:46 ` garynot at comcast dot net
2012-01-24  8:05 ` 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).