// PR c++/13865
// Bug: We were destroying 'a' before executing the loop.
#include
int i;
int r;
class A
{
public:
A() { printf("A ctor\n"); }
~A()
{
printf("A dtor\n");
if
// PR c++/12253
// Bug: We were failing to destroy the temporary A passed to the
// constructor for b[0] before going on to construct b[1].
// { dg-do run }
extern "C" int printf (const char *, ...)
// PR c++/9782
extern "C" void printf(char *, ...);
template
struct A {
A() {printf("A::A()\n");}
};
struct B {
B() {printf("B::B()\n");}
};
int main () {
new A[1][1];
new B [
// { dg-do run }
// Origin: Giovanni Bajo
// DR20: Some clarifications needed for 12.8 para 15
extern "C" void printf(const char*, ...);
extern "C" void abort(v
#include
int acker(int, int);
int
main(void)
{
int n = acker(3,6);
if (n != 509)
printf("acker(3,6) = %d != 509\n", n);
return(0);
}
int
acker(int x,int y)
{
if (x==0)
r
// { dg-do run }
// Testcase for proper handling of rethrow.
#include
int c, d;
struct A
{
int i;
A () { i = ++c; printf ("A() %d\n", i); }
A (const A&) { i = ++c; printf ("A(const
// { dg-do run }
// Testcase for proper handling of rethrow.
#include
int c, d;
struct A
{
int i;
A () { i = ++c; printf ("A() %d\n", i); }
A (const A&) { i = ++c; printf ("A(const