aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/opt/longbranch1.C
blob: a64a57aea2ad4184cf407cc34cfa220c2d493be3 (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
// PR c++/5964
// This testcase failed to link on sparc -m64 -O0, because instruction
// lengths were incorrectly computed
// { dg-do link }
// { dg-options "-O0" }

#define makecode for (int i = 1; i < 1000; ++i) i *= 3
#define muchcode \
        makecode; makecode; makecode; makecode; makecode; makecode; \
        makecode; makecode; makecode; makecode; makecode; makecode; \
        makecode; makecode; makecode; makecode; makecode; makecode; \
        makecode; makecode; makecode; makecode; makecode; makecode

#define verymuchcode \
        muchcode; muchcode; muchcode; muchcode; muchcode; muchcode; \
        muchcode; muchcode; muchcode; muchcode; muchcode; muchcode; \
        muchcode; muchcode; muchcode; muchcode; muchcode; muchcode; \
        muchcode; muchcode; muchcode; muchcode; muchcode; muchcode; \
        muchcode; muchcode; muchcode; muchcode; muchcode; muchcode; \
        muchcode; muchcode; muchcode; muchcode; muchcode; muchcode; \
        muchcode; muchcode; muchcode; muchcode; muchcode; muchcode; \
        muchcode; muchcode; muchcode; muchcode; muchcode; muchcode; \
        muchcode; muchcode; muchcode; muchcode; muchcode; muchcode; \
        muchcode; muchcode; muchcode; muchcode; muchcode; muchcode; \
        muchcode; muchcode; muchcode; muchcode; muchcode; muchcode; \
        muchcode; muchcode; muchcode; muchcode; muchcode; muchcode; \
        muchcode; muchcode; muchcode; muchcode; muchcode; muchcode

int
main (int argc, char **argv)
{
loop:
  verymuchcode;
  delete[] argv;
  goto loop;
}