modernc.org/ccgo/v3@v3.16.14/lib/testdata/gcc-9.1.0/gcc/testsuite/gcc.c-torture/execute/20030218-1.c (about)

     1  /*  On H8, the predicate general_operand_src(op,mode) used to ignore
     2      mode when op is a (mem (post_inc ...)).  As a result, the pattern
     3      for extendhisi2 was recognized as extendqisi2.  */
     4  
     5  extern void abort ();
     6  extern void exit (int);
     7  
     8  short *q;
     9  
    10  long
    11  foo (short *p)
    12  {
    13    long b = *p;
    14    q = p + 1;
    15    return b;
    16  }
    17  
    18  int
    19  main ()
    20  {
    21    short a = 0xff00;
    22    if (foo (&a) != (long) (short) 0xff00)
    23      abort ();
    24    exit (0);
    25  }