blob: 35adc256c218cdff89047ae7855ef47c370df12b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
/* { dg-do compile } */
/* { dg-options "-O3" } */
template <typename> struct A {
unsigned _width, _height, _depth, _spectrum;
template <typename t> A(t p1) {
int a = p1.size();
if (a) {
_width = p1._width;
_depth = _height = _spectrum = p1._spectrum;
}
}
long size() { return (long)_width * _height * _depth * _spectrum; }
};
int d;
void fn1(void *);
A<int> *fn2();
void fn3() {
int b;
for (;;) {
A<char> c(*fn2());
fn1(&c);
if (d || !b)
throw;
}
}
|