summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/lto/20080917_0.C
blob: 2f4f33bd0e9ac7c6c402b4035dc826bc0c269bb0 (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
// { dg-lto-do assemble }
// { dg-lto-options {{-O2 -flto -funsigned-char}} }
int
foo (char *s, int flag)
{
  for (;;)
    {
      unsigned char c;
      if (flag)
	c = *s;
      else
	c = *s;
      return c;
    }
}

int
baz (const char *s, int flag)
{
  for (;;)
    {
      unsigned char c;
      if (flag)
	c = *s;
      else
	c = *s;
      return c;
    }
}