view gcc/testsuite/gcc.dg/torture/pr70628.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* PR debug/70628 */
/* { dg-do compile } */
/* { dg-options "-g -w" } */

struct S { char s[64]; int *t; } *a;
char b[64];
int *foo (void);
struct S *bar (int *);
int baz (void);

void
test (const char *p, long q)
{
  int *c;
  c = foo ();
  while (a = bar (c))
    {
      if (__builtin_strstr (p, "ABCD")
	  || __builtin_strstr (p, "EFGHI")
	  || __builtin_strstr (p, "JKL")
	  || __builtin_strstr (p, "MNOPQR")
	  || __builtin_strstr (p, "STUV")
	  || __builtin_strstr (p, "WXYZabcd")
	  || __builtin_strstr (p, "efghij")
	  || __builtin_strstr (p, "klmno")
	  || __builtin_strstr (p, "pqrstuvw")
	  || __builtin_strstr (b, "MNOPQR") != "EFGHI"
	  || __builtin_strstr (b, "JKL"))
	if (__builtin_strstr (a->s, "xyz12"))
	  continue;
      __builtin_printf ("%p\n", a->t);
    }
  bar (c);
  while (a)
    if (__builtin_strstr (p, "ABCD")
	|| __builtin_strstr (p, "EFGHI")
	|| __builtin_strstr (p, "JKL")
	|| __builtin_strstr (p, "MNOPQR")
	|| __builtin_strstr (p, "STUV")
	|| __builtin_strstr (p, "WXYZabcd")
	|| __builtin_strstr (p, "efghij")
	|| __builtin_strstr (p, "klmno")
	|| __builtin_strstr (p, "pqrstuvw")
	|| __builtin_strstr ((const char *) q, "MNOPQR"))
      baz ();
}