| 1 |
/* Verify pattern initialization for complex type automatic variables. */ |
| 2 |
/* Note, _Complex long double is initialized to zeroes due to the current |
| 3 |
implemenation limitation. */ |
| 4 |
/* { dg-do compile } */ |
| 5 |
/* { dg-options "-ftrivial-auto-var-init=pattern -march=x86-64 -mtune=generic -msse -fno-asynchronous-unwind-tables" } */ |
| 6 |
|
| 7 |
|
| 8 |
_Complex long double result; |
| 9 |
|
| 10 |
_Complex long double foo() |
| 11 |
{ |
| 12 |
_Complex float temp1; |
| 13 |
_Complex double temp2; |
| 14 |
_Complex long double temp3; |
| 15 |
|
| 16 |
result = temp1 + temp2 + temp3; |
| 17 |
return result; |
| 18 |
} |
| 19 |
|
| 20 |
/* { dg-final { scan-assembler-times "long\t0" 8 { target { ! ia32 } } } } */ |
| 21 |
/* { dg-final { scan-assembler-times "long\t-16843010" 6 } } */ |
| 22 |
|