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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.other/] [init9.C] - Diff between revs 154 and 816

Only display areas with differences | Details | Blame | View Log

Rev 154 Rev 816
// { dg-do assemble  }
// { dg-do assemble  }
// Based on a testcase submitted by Tudor Hulubei 
// Based on a testcase submitted by Tudor Hulubei 
// X is not a POD because it has a user-defined destructor.
// X is not a POD because it has a user-defined destructor.
// Therefore, we can't cross its initialization.
// Therefore, we can't cross its initialization.
// vector is not even an aggregate; nevertheless, no error is
// vector is not even an aggregate; nevertheless, no error is
// reported...
// reported...
struct A {
struct A {
  A() {}
  A() {}
};
};
void a() {
void a() {
  goto bar; // { dg-error "" } jump from here
  goto bar; // { dg-error "" } jump from here
  A x; // { dg-error "" } jump crosses initialization
  A x; // { dg-error "" } jump crosses initialization
 bar: // { dg-error "" } jump to here
 bar: // { dg-error "" } jump to here
  ;
  ;
}
}
struct X {
struct X {
  ~X() {}
  ~X() {}
};
};
void b() {
void b() {
  goto bar; // { dg-error "" } jump from here
  goto bar; // { dg-error "" } jump from here
  X x; // { dg-error "" } jump crosses initialization
  X x; // { dg-error "" } jump crosses initialization
 bar: // { dg-error "" } jump to here
 bar: // { dg-error "" } jump to here
  ;
  ;
}
}
#include 
#include 
void c() {
void c() {
  goto bar; // { dg-error "" } jump from here
  goto bar; // { dg-error "" } jump from here
  std::vector x; // { dg-error "" } jump crosses initialization
  std::vector x; // { dg-error "" } jump crosses initialization
 bar: // { dg-error "" } jump to here
 bar: // { dg-error "" } jump to here
  ;
  ;
}
}
 
 

powered by: WebSVN 2.1.0

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