% cat bug.c   
struct Virtual {
  virtual ~Virtual() { }
} __attribute__ ((visibility ("hidden")));

const void* get_vptr() {
  return new Virtual();
}

const void* p = get_vptr();

% g++ -c bug.c
bug.c: In constructor 'Virtual::Virtual()':
bug.c:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

This looks similar to PR 26986, which I cannot reproduce anymore. Maybe it's
some kind of memory corruption within the visibility handling?


-- 
           Summary: segfault with virtual class and visibility ("hidden")
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: falk at debian dot org


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

Reply via email to