public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/17220] New: Incorrect ouput for C++ exceptions with -fomit-frame-pointer
@ 2004-08-28  0:47 degraaf at cpsc dot ucalgary dot ca
  2004-08-28  0:52 ` [Bug c++/17220] " degraaf at cpsc dot ucalgary dot ca
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: degraaf at cpsc dot ucalgary dot ca @ 2004-08-28  0:47 UTC (permalink / raw)
  To: gcc-bugs

The following code compiles and executes correctly when compiled without
-fomit-frame-pointer, but aborts when compiled with -fomit-frame-pointer:

$ cat registry.cpp
#include <map>
#include <string>
#include <iostream>
using namespace std;

class Registry 
{
  public:
    Registry() : reg() {}
    ~Registry() {}
    void getFloat(string key)
    {
        map<string, float>::iterator i = reg.find(key);
        if (i == reg.end())
            throw new int(5);
    }

  protected:
    map<string, float> reg;
};

int main()
{
    Registry reg;
    string s = "four";
    
    try 
    {
        reg.getFloat(s);
    }
    catch (...)
    {
        cout << "caught one" << endl;
    }
    return 0;
}

$ g++ registry.cpp
$ ./a.out
caught one
$ g++ -fomit-frame-pointer registry.cpp
$ ./a.out
Aborted
$ 


$ g++ -v
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --disable-libunwind-exceptions --with-system-zlib
--enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7)

$ uname -a
Linux silmaril.renniedegraaf.homeip.net 2.6.8.1 #1 Sat Aug 21 16:32:26 MDT 2004
i686 athlon i386 GNU/Linux

-- 
           Summary: Incorrect ouput for C++ exceptions with -fomit-frame-
                    pointer
           Product: gcc
           Version: 3.3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: degraaf at cpsc dot ucalgary dot ca
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug c++/17220] Incorrect ouput for C++ exceptions with -fomit-frame-pointer
  2004-08-28  0:47 [Bug c++/17220] New: Incorrect ouput for C++ exceptions with -fomit-frame-pointer degraaf at cpsc dot ucalgary dot ca
@ 2004-08-28  0:52 ` degraaf at cpsc dot ucalgary dot ca
  2004-08-28  1:08 ` [Bug target/17220] " pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: degraaf at cpsc dot ucalgary dot ca @ 2004-08-28  0:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From degraaf at cpsc dot ucalgary dot ca  2004-08-28 00:52 -------
Created an attachment (id=6997)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6997&action=view)
Preprocessed source for bug 17220

Compile with -fomit-frame-pointer, and it fails.  Compile without, and it
works.

-- 


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


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

* [Bug target/17220] Incorrect ouput for C++ exceptions with -fomit-frame-pointer
  2004-08-28  0:47 [Bug c++/17220] New: Incorrect ouput for C++ exceptions with -fomit-frame-pointer degraaf at cpsc dot ucalgary dot ca
  2004-08-28  0:52 ` [Bug c++/17220] " degraaf at cpsc dot ucalgary dot ca
@ 2004-08-28  1:08 ` pinskia at gcc dot gnu dot org
  2004-09-10  0:42 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-28  1:08 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-08-28 01:08 -------
Confirmed with -march=i386 -fomit-frame-pointer so this is a target problem.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |target
 GCC target triplet|                            |i386-pc-linux-gnu
           Keywords|                            |EH, wrong-code
      Known to fail|                            |3.5.0


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


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

* [Bug target/17220] Incorrect ouput for C++ exceptions with -fomit-frame-pointer
  2004-08-28  0:47 [Bug c++/17220] New: Incorrect ouput for C++ exceptions with -fomit-frame-pointer degraaf at cpsc dot ucalgary dot ca
  2004-08-28  0:52 ` [Bug c++/17220] " degraaf at cpsc dot ucalgary dot ca
  2004-08-28  1:08 ` [Bug target/17220] " pinskia at gcc dot gnu dot org
@ 2004-09-10  0:42 ` pinskia at gcc dot gnu dot org
  2004-11-26  2:22 ` rth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-10  0:42 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|4.0                         |4.0.0


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


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

* [Bug target/17220] Incorrect ouput for C++ exceptions with -fomit-frame-pointer
  2004-08-28  0:47 [Bug c++/17220] New: Incorrect ouput for C++ exceptions with -fomit-frame-pointer degraaf at cpsc dot ucalgary dot ca
                   ` (2 preceding siblings ...)
  2004-09-10  0:42 ` pinskia at gcc dot gnu dot org
@ 2004-11-26  2:22 ` rth at gcc dot gnu dot org
  2004-11-26  2:26 ` rth at gcc dot gnu dot org
  2004-12-10  3:32 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: rth at gcc dot gnu dot org @ 2004-11-26  2:22 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rth at gcc dot gnu dot org
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-11-26 02:22:09
               date|                            |


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


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

* [Bug target/17220] Incorrect ouput for C++ exceptions with -fomit-frame-pointer
  2004-08-28  0:47 [Bug c++/17220] New: Incorrect ouput for C++ exceptions with -fomit-frame-pointer degraaf at cpsc dot ucalgary dot ca
                   ` (3 preceding siblings ...)
  2004-11-26  2:22 ` rth at gcc dot gnu dot org
@ 2004-11-26  2:26 ` rth at gcc dot gnu dot org
  2004-12-10  3:32 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: rth at gcc dot gnu dot org @ 2004-11-26  2:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rth at gcc dot gnu dot org  2004-11-26 02:26 -------
I could reproduce the patch previously, but after
  http://gcc.gnu.org/ml/gcc-patches/2004-11/msg02219.html
and
  http://gcc.gnu.org/ml/gcc/2004-11/msg00912.html
I can't.

This may mean that it was a duplicate of PR6764, though I can't prove
that from the Rather Large-ish test case.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |WAITING


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


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

* [Bug target/17220] Incorrect ouput for C++ exceptions with -fomit-frame-pointer
  2004-08-28  0:47 [Bug c++/17220] New: Incorrect ouput for C++ exceptions with -fomit-frame-pointer degraaf at cpsc dot ucalgary dot ca
                   ` (4 preceding siblings ...)
  2004-11-26  2:26 ` rth at gcc dot gnu dot org
@ 2004-12-10  3:32 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-10  3:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-10 03:32 -------
Closing as fixed as I can no longer reproduce it either but I could before.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |3.3.6


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


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

end of thread, other threads:[~2004-12-10  3:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-28  0:47 [Bug c++/17220] New: Incorrect ouput for C++ exceptions with -fomit-frame-pointer degraaf at cpsc dot ucalgary dot ca
2004-08-28  0:52 ` [Bug c++/17220] " degraaf at cpsc dot ucalgary dot ca
2004-08-28  1:08 ` [Bug target/17220] " pinskia at gcc dot gnu dot org
2004-09-10  0:42 ` pinskia at gcc dot gnu dot org
2004-11-26  2:22 ` rth at gcc dot gnu dot org
2004-11-26  2:26 ` rth at gcc dot gnu dot org
2004-12-10  3:32 ` 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).