gcc version 4.3.1 ada exception bug from foreign code?

2008-09-11 Thread debian-gcc
Hello.

I've hit a wall which I believe to be a bug in GCC 4.3.1.

Essentially, a piece of Ada code calls a foreign C function with
a callback as an argument. The callback is an Ada procedure which
raises an exception. The original Ada caller catches the exception
and execution continues from that point.

That's what *should* happen (and does on the other platforms I've tested
on).

However, on lenny/sid with GCC 4.3.1, it seems that the exception never
leaves the innermost callback, instead printing an error message to
stderr as if an unhandled exception had reached the outermost point
of the program:

  raised EXCEPT.TEST_ERROR : this should have been caught

Here's a code example:

/* cpart.c */

#include 
#include 

void (*raiser_callback)(const char *str) = NULL;

void
cpart_set (void (*callback)(const char *str))
{
  raiser_callback = callback;
}

void
cpart_raise (const char *str)
{
  printf ("-- C %s\n", __func__);
  raiser_callback (str);
  printf ("-- C %s - should not be here\n", __func__);
  abort (); /* not reached */
}

-- except.adb

with interfaces.c.strings;
with ada.text_io;
with ada.exceptions;

procedure except is
  package io renames ada.text_io;
  package ex renames ada.exceptions;
  package cs renames interfaces.c.strings;

  test_error : exception;

  procedure ada_raiser (str : cs.chars_ptr) is
  begin
io.put_line ("-- Ada ada_raiser");
raise test_error with cs.value (str);
  end ada_raiser;

  procedure cpart_raise (str : cs.chars_ptr);
  procedure cpart_set (callback : access procedure (str : cs.chars_ptr));
  pragma import (c, cpart_raise, "cpart_raise");
  pragma import (c, cpart_set, "cpart_set");

  message : cs.chars_ptr := cs.new_string ("this should have been caught");
begin
  io.put_line ("-- Ada begin");

  -- set callback for exception raising
  cpart_set (ada_raiser'access);
  begin
cpart_raise (message);
  exception
-- exception handling section here is not reached, process exits
when e : test_error =>
  io.put_line ("caught test_error: " & ex.exception_message (e));
  end;

  -- execution never reaches this line
  io.put_line ("-- Ada end");
end except;

Any help would be appreciated (even confirmation that this isn't my fault
would be nice).


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: gcc version 4.3.1 ada exception bug from foreign code?

2008-09-11 Thread debian-gcc
On 20080911 17:37:23, Bastian Blank wrote:
> On Thu, Sep 11, 2008 at 03:34:53PM +0100, [EMAIL PROTECTED] wrote:
> > Essentially, a piece of Ada code calls a foreign C function with
> > a callback as an argument. The callback is an Ada procedure which
> > raises an exception. The original Ada caller catches the exception
> > and execution continues from that point.
> 
> Do you build the C source with -fexceptions? Otherwise its illegal to
> throw exception through this code.

Well, that was painless. Thanks.

I wasn't even aware of the -fexceptions flag.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Fixed in NMU of gcc272 2.7.2.3-18

2001-04-01 Thread Debian GCC maintainers
tag 12375 + fixed
tag 20606 + fixed
tag 20889 + fixed
tag 24788 + fixed
tag 26100 + fixed
tag 34322 + fixed
tag 4429 + fixed
tag 4430 + fixed
tag 48726 + fixed
tag 5367 + fixed
tag 54544 + fixed
tag 6047 + fixed
tag 63154 + fixed

quit

This message was generated automatically in response to a
non-maintainer upload.  The .changes file follows.

-BEGIN PGP SIGNED MESSAGE-

Format: 1.7
Date: Sat,  3 Mar 2001 23:24:49 +0100
Source: gcc272
Binary: gcc272-docs gcc272
Architecture: source all i386
Version: 2.7.2.3-18
Distribution: unstable
Urgency: low
Maintainer: Debian GCC maintainers <[EMAIL PROTECTED]>
Changed-By: Matthias Klose <[EMAIL PROTECTED]>
Description: 
 gcc272 - The GNU C compiler.
 gcc272-docs - Documentation for the gcc compiler (gcc272).
Closes: 4429 4430 5367 6047 12375 20606 20889 24788 26100 34322 48726 54544 
63154
Changes: 
 gcc272 (2.7.2.3-18) unstable; urgency=low
 .
   * Close all gcc272 in the Debian bug tracking archive. The use of
 gcc272 is deprecated. The only reason it exists is to have a
 compiler for the linux kernel 2.0.x.
 The bug reports for gcc272 are still available on
 http://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=gcc272&archive=yes
 Closes: #4429, #4430, 4954, #5367, #6047, #12375, #20606, #20889,
 #24788, #26100, #34322, #48726, #54544, #63154.
   * Updated README.Debian to reflect gcc-2.95.3 and the upcoming
 gcc-3.0.
   * Build for i386 and m68k only.
Files: 
 552b1263435cc50146d358d029b53153 930 devel optional gcc272_2.7.2.3-18.dsc
 9e2b97fd2887e05a50649b60507b5a7d 77397 devel optional gcc272_2.7.2.3-18.diff.gz
 3cbf200ca3c2f7ef662a962e7547ba7f 383616 doc optional 
gcc272-docs_2.7.2.3-18_all.deb
 9f4f9ce5dda1aa7b0ea0ed564f5b7bce 633114 devel optional 
gcc272_2.7.2.3-18_i386.deb

-BEGIN PGP SIGNATURE-
Version: 2.6.3ia
Charset: noconv
Comment: Requires PGP version 2.6 or later.

iQEVAwUBOscorguDzMCIcnEhAQEG5Qf8DMkobwUPd9k/SOaDlWQVv8yqz3jozDxz
800Z9Ftioi8HDI3L/eudbKnLKVvdrP/3zexoiLMXTdXNiFoTkKqfSrZmrVnkBuF6
MHEOcHF+2U8SuWIxFR2ilLHWv0LQ9SNhabdH0zvXZSHXoEPF0C4oSKoa3Jqp6ME2
pwO9ZNoJjEPR/9vNFPLZCe2TUcDKru/v1s2q+Kc4CJt6bQY+SCbd0ebq67F47p8t
uLfF9VH4+THEHbtHPNrw4H5MIUNSs/s1b7W1Y2KIn8bFMAF46p9vsuQ/XvRJJoGZ
jvbWU34a13IvoYWqGbU8FF9bgpvhBrglnnDF/8F4QYwieuZhpmWXzg==
=WvmL
-END PGP SIGNATURE-




Unidentified subject!

2018-06-16 Thread bounce-debian-gcc=archive=mail-archive.com


Unidentified subject!

2018-06-17 Thread bounce-debian-gcc=archive=mail-archive.com


Bug#187564: [Bug rtl-optimization/10692] [3.3/3.4/4.0 regression] [m68k] miscompilation of perl with -O2 -fPIC

2005-01-07 Thread debian-gcc at lists dot debian dot org

--- Additional Comments From debian-gcc at lists dot debian dot org  
2005-01-07 21:36 ---
[tried to reopen the report, but didn't succeed, and  You tried to change the
Versions this fails on field from 3.3.3 3.4.0 4.0.0 to 3.3.3 3.4.0]

The patch applies to the 3.3 branch as well and fixes the bug. Testsuite
currently running.

Ok for the 3.3 branch as well?

Matthias


-- 
   What|Removed |Added

 CC||gdr at gcc dot gnu dot org


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

--- You are receiving this mail because: ---
You reported the bug, or are watching the reporter.




Bug#193830: [Bug c++/10849] [3.3/3.4 regression] Cannot define an out-of-class specialization of a private nested template class

2003-06-29 Thread debian-gcc at lists dot debian dot org
PLEASE REPLY TO [EMAIL PROTECTED] ONLY, *NOT* [EMAIL PROTECTED]

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



--- Additional Comments From debian-gcc at lists dot debian dot org  
2003-06-29 08:44 ---
[forwarded from http://bugs.debian.org/193830]

fyi,  
 
gcc version 3.3.1 20030626 (Debian prerelease) 
(aka '3.3.1-0pre0' in debian) 
 
improves a bit on the situation: 
 
class Foo { 
  template  struct InFoo; 
  template  struct InFoo2; 
}; 
 
template<> 
struct Foo::InFoo { 
  // ...this works now... (didn't work with 3.3.0) 
}; 
 
template 
struct Foo::InFoo2 { 
  // ...this still triggers error 
}; 





--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.




Bug#193830: [Bug c++/10849] [3.3/3.4 regression] Cannot define an out-of-class specialization of a private nested template class

2003-06-29 Thread debian-gcc at lists dot debian dot org
PLEASE REPLY TO [EMAIL PROTECTED] ONLY, *NOT* [EMAIL PROTECTED]

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


debian-gcc at lists dot debian dot org changed:

   What|Removed |Added

 CC||193830 at bugs dot debian
   ||dot org





--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.