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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.other/] [init9.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 305 jeremybenn
// { dg-do assemble  }
2
 
3
// Based on a testcase submitted by Tudor Hulubei 
4
 
5
// X is not a POD because it has a user-defined destructor.
6
// Therefore, we can't cross its initialization.
7
 
8
// vector is not even an aggregate; nevertheless, no error is
9
// reported...
10
 
11
struct A {
12
  A() {}
13
};
14
 
15
void a() {
16
  goto bar; // { dg-error "" } jump from here
17
  A x; // { dg-error "" } jump crosses initialization
18
 bar: // { dg-error "" } jump to here
19
  ;
20
}
21
 
22
struct X {
23
  ~X() {}
24
};
25
 
26
void b() {
27
  goto bar; // { dg-error "" } jump from here
28
  X x; // { dg-error "" } jump crosses initialization
29
 bar: // { dg-error "" } jump to here
30
  ;
31
}
32
 
33
#include 
34
 
35
void c() {
36
  goto bar; // { dg-error "" } jump from here
37
  std::vector x; // { dg-error "" } jump crosses initialization
38
 bar: // { dg-error "" } jump to here
39
  ;
40
}

powered by: WebSVN 2.1.0

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