This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/27143] New: [4.1/4.2 regression] ICE with extern


The following code snippet causes an ICE when compiled with -O:

==========================================
struct A
{
    char c;

    int bar() const;
    int foo() const { return bar(); }
};

A a;

void baz()
{
    a.foo();
    extern A a;
    a.foo();
}
==========================================

  bug.cc: In function 'void baz()':
  bug.cc:11: error: found real variable when subvariables should have appeared
  while verifying SSA_NAME a_11 in statement
  #   a_11 = V_MAY_DEF <a_9>;
  #   SFT.0_12 = V_MAY_DEF <SFT.0_10>;
  D.2081_2 = bar (this_1);
  bug.cc:11: error: found real variable when subvariables should have appeared
  while verifying SSA_NAME a_13 in statement
  #   a_13 = V_MAY_DEF <a_11>;
  #   SFT.0_14 = V_MAY_DEF <SFT.0_12>;
  D.2085_6 = bar (this_5);
  bug.cc:11: error: found real variable when subvariables should have appeared
  for SSA_NAME: a_9 in statement:
  #   a_11 = V_MAY_DEF <a_9>;
  #   SFT.0_12 = V_MAY_DEF <SFT.0_10>;
  D.2081_2 = bar (this_1);
  bug.cc:11: internal compiler error: verify_ssa failed
  Please submit a full bug report, [etc.]

This is related to PR 26757, but also happens on mainline.


-- 
           Summary: [4.1/4.2 regression] ICE with extern
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org
 BugsThisDependsOn: 26757


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]