summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-14.c
blob: 9ead438cc262ac64978f5bfa29d702d825188544 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* { dg-do compile } */ 
/* { dg-options "-O2 -fdump-tree-optimized" } */
extern unsigned int strlen (const char *) __attribute__ ((__pure__));

void
foo (const char *str)
{
  unsigned int a = strlen (str);
  unsigned int b = strlen (str);
  if (a != b)
    link_error ();
}
/* { dg-final { scan-tree-dump-times "link_error" 0 "optimized"} } */
/* { dg-final { cleanup-tree-dump "optimized" } } */