[Bug c++/12327] New: [3.4 Regression] Cannot throw objects of POD type in unit-at-a-time mode

fw at deneb dot enyo dot de gcc-bugzilla@gcc.gnu.org
Thu Sep 18 11:51:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: [3.4 Regression] Cannot throw objects of POD type in
                    unit-at-a-time mode
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: fw at deneb dot enyo dot de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu

The following code results in a linker error with -funit-at-a-time (or -O2).

/tmp/cc2B7TmX.o(.text+0x1b): In function `main':
/tmp/throw-pod.cc:6: undefined reference to `typeinfo for pod_type'
collect2: ld returned 1 exit status

struct pod_type { };

int
main()
{
  throw pod_type();
}



More information about the Gcc-bugs mailing list