| 1 |
/* Verify pattern initialization for floating point type automatic variables. */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-options "-ftrivial-auto-var-init=pattern -fdump-tree-gimple" } */ |
| 4 |
|
| 5 |
long double result; |
| 6 |
|
| 7 |
long double foo() |
| 8 |
{ |
| 9 |
float temp1; |
| 10 |
double temp2; |
| 11 |
long double temp3; |
| 12 |
|
| 13 |
result = temp1 + temp2 + temp3; |
| 14 |
return result; |
| 15 |
} |
| 16 |
|
| 17 |
/* { dg-final { scan-tree-dump "temp1 = .DEFERRED_INIT \\(4, 1, \&\"temp1\"" "gimple" } } */ |
| 18 |
/* { dg-final { scan-tree-dump "temp2 = .DEFERRED_INIT \\(8, 1, \&\"temp2\"" "gimple" } } */ |
| 19 |
/* { dg-final { scan-tree-dump "temp3 = .DEFERRED_INIT \\((8|12|16), 1, \&\"temp3\"" "gimple" } } */ |