aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-14.c
blob: 2371cfa1a58035614ce2e293332376056c44bf9d (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 __SIZE_TYPE__ strlen (const char *) __attribute__ ((__pure__));

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