repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2014-04-07 Charles Baylis <charles.baylis@linaro.org>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
torture
/
pr39678.C
blob
a7c120ad4db76477e4c1b375a6f24e5ed0de2ca4
1
/* PR target/39678 */
2
/* { dg-do run } */
3
/* { dg-options "-Wno-psabi" } */
4
struct Y {};
5
struct X {
6
struct Y y;
7
__complex__ float val;
8
};
9
10
struct X __attribute__((noinline))
11
foo (float *p)
12
{
13
struct X x;
14
__real x.val = p[0];
15
__imag x.val = p[1];
16
return x;
17
}
18
extern "C" void abort (void);
19
float a[2] = { 3., -2. };
20
int main()
21
{
22
struct X x = foo(a);
23
if (__real x.val != 3. || __imag x.val != -2.)
24
abort ();
25
return 0;
26
}