Bug 63512 - [5 Regression] ICE: error: virtual use of statement not up-to-date
Summary: [5 Regression] ICE: error: virtual use of statement not up-to-date
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 5.0
: P3 normal
Target Milestone: 5.0
Assignee: Richard Biener
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-11 21:45 UTC by Markus Trippelsdorf
Modified: 2014-10-14 07:41 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2014-10-13 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Trippelsdorf 2014-10-11 21:45:58 UTC
~ % cat ParseDeclCXX.ii
extern "C" {
void __assert_fail ();
unsigned long strlen (const char *);
}
class A
{
  int Data;
  int Length;

public:
  A (const char *p1) : Data ()
  {
    p1 ? void() : __assert_fail ();
    Length = strlen (p1);
  }
};
enum TokenKind
{
  semi
};
class B
{
public:
  void m_fn1 ();
};
class C
{
  void m_fn2 (TokenKind, int, A);
  struct D
  {
    D (int);
    B Range;
  };
  int *m_fn3 (const int &, int &, int **);
};
int a, b;
int *
C::m_fn3 (const int &, int &, int **)
{
  D c (0);
  if (a)
    c.Range.m_fn1 ();
  m_fn2 (semi, 0, b ? "" : a ? "alias declaration" : "using declaration");
}

 ~ % g++ -c -O2 ParseDeclCXX.ii
ParseDeclCXX.ii: In member function ‘int* C::m_fn3(const int&, int&, int**)’:
ParseDeclCXX.ii:38:1: error: virtual use of statement not up-to-date
 C::m_fn3 (const int &, int &, int **)
 ^
# VUSE <.MEM_16>
_21 = 17;
ParseDeclCXX.ii:38:1: internal compiler error: verify_ssa failed
0x10bb6b0b verify_ssa(bool, bool)
        ../../gcc/gcc/tree-ssa.c:1055
0x1087664b execute_function_todo
        ../../gcc/gcc/passes.c:1758
0x10877087 do_per_function
        ../../gcc/gcc/passes.c:1478
0x1087734f execute_todo
        ../../gcc/gcc/passes.c:1808
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 Markus Trippelsdorf 2014-10-11 21:59:55 UTC
Started with r216065.
Comment 2 Richard Biener 2014-10-13 13:43:14 UTC
Mine.
Comment 3 Richard Biener 2014-10-14 07:36:33 UTC
Author: rguenth
Date: Tue Oct 14 07:36:02 2014
New Revision: 216174

URL: https://gcc.gnu.org/viewcvs?rev=216174&root=gcc&view=rev
Log:
2014-10-14  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/63512
	* tree-ssa-pre.c (create_expression_by_pieces): Mark stmts
	modified.

	* g++.dg/torture/pr63512.C: New testcase.

Added:
    trunk/gcc/testsuite/g++.dg/torture/pr63512.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-pre.c
Comment 4 Richard Biener 2014-10-14 07:41:13 UTC
Fixed.