1  /* { dg-do compile } */
       2  /* { dg-options "-mips16 -mcode-readable=yes -fno-tree-vrp -fno-tree-dominator-opts" } */
       3  /* { dg-skip-if "per-function expected output" { *-*-* } { "-flto" } { "" } } */
       4  
       5  /* This testcase generates multiple constant pools within a function body.  */
       6  
       7  #define C(a,b) \
       8    if (a > b)  goto gt; \
       9    if (a < b)  goto lt;
      10  
      11  #define C4(x,b) C((x)[0], b) C((x)[1],b) C((x)[2],b) C((x)[3],b)
      12  #define C16(x,y) C4(x, (y)[0]) C4(x, (y)[1]) C4(x, (y)[2]) C4(x, (y)[3])
      13  
      14  #define C64(x,y) C16(x,y) C16(x+4,y) C16(x+8,y)
      15  #define C256(x,y) C64(x,y) C64(x,y+4) C64(x,y+8)
      16  
      17  unsigned foo(int x[64], int y[64])
      18  {
      19    C256(x,y);
      20  
      21    return 0x01234567;
      22   gt:
      23    return 0x12345678;
      24   lt:
      25    return 0xF0123456;
      26  }
      27  
      28  /*  Check that:
      29  1. The __pend symbol is emitted as STT_FUNCTION followed by instructions:
      30  	.type	__pend_frob_<X>, @function	# Symbol # must match label.
      31  __pend_foo_<X>: 				# The symbol must match.
      32  	.insn
      33  .L<Y>:
      34  
      35  2. __pend symbol at end of function has type STT_OBJECT
      36  
      37  	.type	__pend_foo_<X>, @object
      38  __pend_foo_<X>:
      39  	.insn
      40  	.end	foo
      41  
      42    */
      43  
      44  /* { dg-final { scan-assembler "\t\\.type\t(__pend_foo_\[0-9\]+), @function\n\\1:\n\t\\.insn\n.L\[0-9\]+:\n" } }  */
      45  /* { dg-final { scan-assembler "\t\\.type\t(__pend_foo_\[0-9\]+), @object\n\\1:\n\t\\.end\tfoo\n" } }  */