1  /* { dg-do compile } */
       2  /* { dg-options "-mcmse" }  */
       3  
       4  int __attribute__ ((cmse_nonsecure_call)) (*bar) (double);
       5  
       6  int
       7  foo (int a)
       8  {
       9    return bar (2.0) + a + 1;
      10  }
      11  
      12  /* Remember dont clear r0 and r1, because we are passing the double parameter
      13   * for bar in them.  */
      14  /* { dg-final { scan-assembler "lsrs\tr4, r4, #1" } } */
      15  /* { dg-final { scan-assembler "lsls\tr4, r4, #1" } } */
      16  /* { dg-final { scan-assembler "movs\tr2, r4" } } */
      17  
      18  /* Now we check that we use the correct intrinsic to call.  */
      19  /* { dg-final { scan-assembler "bl\t__gnu_cmse_nonsecure_call" } } */