Bug 22008 - [4.0/4.1 Regression] ICE on valid code, create_tmp_var
Summary: [4.0/4.1 Regression] ICE on valid code, create_tmp_var
Status: RESOLVED DUPLICATE of bug 23167
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.0.2
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code, monitored
Depends on:
Blocks: 23167
  Show dependency treegraph
 
Reported: 2005-06-10 18:18 UTC by Paul Pluzhnikov
Modified: 2005-09-02 15:39 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work: 3.4.0
Known to fail: 4.0.0 4.1.0
Last reconfirmed: 2005-07-01 19:59:04


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Pluzhnikov 2005-06-10 18:18:00 UTC
The test was reduced from PlumHall test X_132p92:

$ cat x_132p92.cc
struct X_132p92
{
    static int k;                   // [1]
    X_132p92(const X_132p92 &x);    // [2]
};
void f_132p92(volatile X_132p92 x)  // [3]
{
    bool b = x.k >= 1;
}

$ g++4 -c x_132p92.cc
x_132p92.cc: In function รข:
x_132p92.cc:8: internal compiler error: in create_tmp_var, at gimplify.c:368
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

Commenting out "static" at [1], copy-ctor at [2], or volatile at [3]
"cures" the bug.
Comment 1 Drea Pinski 2005-06-10 18:56:08 UTC
Confirmed, reduced testcase:
struct a
{
    static int k;
    a(const a &x);
};
void f(volatile a x) { x.k; }
Comment 2 Drea Pinski 2005-07-01 19:59:04 UTC
: Search converges between 2004-05-11-trunk (#454) and 2004-05-14-trunk (#455).\
: Search converges between 2003-06-25-ssa (#14) and 2003-06-26-ssa (#15).
Comment 3 Mark Mitchell 2005-07-06 17:02:41 UTC
Postponed until 4.0.2.
Comment 4 Mark Mitchell 2005-09-02 15:39:42 UTC

*** This bug has been marked as a duplicate of 23167 ***