aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20020715-1.c
blob: 5294133f37b088cdc8fb8ba3d51784ffc0a77d2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* PR optimization/7153 */
/* Verify that GCC doesn't promote a register when its
   lifetime is not limited to one basic block. */

void f(char);
void g(void);

void scale(void)
{
  int width;
  char bytes;
  char *src;

  if (width)
  {
    bytes = *src;
    g();
    width *= bytes;
  }

  f(bytes);
}