summaryrefslogtreecommitdiff
path: root/support/regression/tests/gcc-torture-execute-pr82387.c
blob: 36e56ae05f89869c0264bbe2034b39ffd1d14fbb (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
32
33
34
35
36
/*
pr82387.c from the execute part of the gcc torture tests.
*/

#include <testfwk.h>

/* PR tree-optimization/82387 */

#if 0 // TODO: Enable when SDCC accepts the struct initializatio below
struct A { int b; };
int f = 1;

struct A
foo (void)
{
  struct A h[] = { 
    {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, 
    {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, 
    {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, 
    {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, 
    {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, 
    {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, 
    {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, 
  };
  return h[24];
}
#endif
void
testTortureExecute (void)
{
#if 0
  struct A i = foo (), j = i;
  j.b && (f = 0);
  return f;
#endif
}