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

            Bug ID: 88925
           Summary: address of static string changes
           Product: gcc
           Version: 8.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ssbssa at yahoo dot de
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

Created attachment 45468
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45468&action=edit
test case

With the attached file, I get an unexpected result with these arguments:
$ g++ -ovirtual virtual.cpp -flto -flto-partition=max -O3

$ ./virtual

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.


This is a heavily reduced test case of another program of mine, but I didn't
need -flto-partition=max there to get this problem (I think because it's a lot
bigger).

So the problem is with the static strings typeDerived1 and typeDerived2.
I would expect the pointers of Derived1::getType() and Derived2::getType() to
always match either typeDerived1 or typeDerived2.

Reply via email to