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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.other/] [crash15.C] - Blame information for rev 749

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

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do assemble  }
2
// { dg-options "-O2" }
3
// g++ crashed because we unsaved the TARGET_EXPR for the return value
4
// for get_allocator without first expanding it, because it was part of the
5
// cleanup for the temporary string.
6
 
7
// Derived from libstdc++ v3 code.
8
 
9
 
10
class AA {};
11
 
12
void fee (const AA&);
13
 
14
class basic_string
15
{
16
public:
17
  basic_string(const char*);
18
 
19
  ~basic_string()
20
  { fee (this->get_allocator()); }
21
 
22
  AA get_allocator();
23
};
24
 
25
class failure
26
{
27
public:
28
  failure(const basic_string& __str);
29
};
30
 
31
class foo
32
{
33
public:
34
  foo(int x)
35
  {
36
    throw failure ("");
37
  }
38
};
39
 
40
void test05()
41
{
42
  foo ofs(0);
43
}

powered by: WebSVN 2.1.0

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