(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
graphite/
pr43012.c
       1  /* This testcase is from PR43012.
       2     You will need CLooG-PPL 0.15.8 or later to have this testcase fixed.  */
       3  
       4  /* { dg-do run } */
       5  /* { dg-options "-O2 -floop-strip-mine" } */
       6  
       7  extern void abort (void);
       8  
       9  #ifdef DBG
      10  extern int printf (const char *, ...);
      11  #endif
      12  
      13  #define LAST_TOKEN 534
      14  #define FLOAT_FUNCT_TOKEN 64
      15  #define VECTOR_FUNCT_TOKEN 77
      16  #define COLOUR_KEY_TOKEN 89
      17  
      18  int Table[LAST_TOKEN];
      19  
      20  void
      21  pre_init_tokenizer ()
      22  {
      23    int i;
      24  
      25    for (i = 0; i < LAST_TOKEN; i++)
      26      {
      27        Table[i] = i;
      28        if (i < FLOAT_FUNCT_TOKEN)
      29  	Table[i] = FLOAT_FUNCT_TOKEN;
      30        else
      31  	{
      32  	  if (i < VECTOR_FUNCT_TOKEN)
      33  	    Table[i] = VECTOR_FUNCT_TOKEN;
      34  	  else
      35  	    {
      36  	      if (i < COLOUR_KEY_TOKEN)
      37  		Table[i] = COLOUR_KEY_TOKEN;
      38  	    }
      39  	}
      40      }
      41  }
      42  
      43  void
      44  check ()
      45  {
      46    int i;
      47  
      48    for (i = 0; i < FLOAT_FUNCT_TOKEN; i++)
      49      if (Table[i] != FLOAT_FUNCT_TOKEN)
      50        abort ();
      51    for (i = FLOAT_FUNCT_TOKEN; i < VECTOR_FUNCT_TOKEN; i++)
      52      if (Table[i] != VECTOR_FUNCT_TOKEN)
      53        abort ();
      54    for (i = VECTOR_FUNCT_TOKEN; i < COLOUR_KEY_TOKEN; i++)
      55      if (Table[i] != COLOUR_KEY_TOKEN)
      56        abort ();
      57    for (i = COLOUR_KEY_TOKEN; i < LAST_TOKEN; i++)
      58      if (Table[i] != i)
      59        abort ();
      60  }
      61  
      62  int
      63  main ()
      64  {
      65    int i;
      66  
      67    pre_init_tokenizer ();
      68  #ifdef DBG
      69    for (i = 0; i < LAST_TOKEN; i++)
      70      printf ("%3d: %d\n", i, Table[i]);
      71  #endif
      72    check ();
      73    return 0;
      74  }