OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [opt/] [inline1.C] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/6316
2
// This testcase ICEd because when deferred bar()::F::F() was being
3
// expanded, containing bar() was still deferred and had DECL_EXTERNAL set
4
// (and DECL_NOT_REALLY_EXTERN too).
5
// { dg-do compile }
6
// { dg-options "-O3" }
7
 
8
struct A { ~A() throw() {} };
9
template struct B { U a; B(const T *); };
10
typedef B C;
11
struct D { D(); };
12
struct E { virtual ~E(); };
13
 
14
E *bar ();
15
 
16
void
17
foo ()
18
{
19
  E *a = bar ();
20
}
21
 
22
extern char *z [];
23
 
24
E *
25
bar ()
26
{
27
  struct F : public E
28
  {
29
    F ()
30
    {
31
      for (int i = 0; i < 2; i++)
32
        C e = z[i];
33
    }
34
    D x, y;
35
  };
36
  return new F ();
37
}
38
 
39
int
40
main ()
41
{
42
  foo ();
43
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.