summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/cris/20011127-1.c
blob: 0e448f8b0b8467e9fb48e9a80d0e0dbbd0348fe6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* Copyright (C) 2001, 2007  Free Software Foundation.
   by Hans-Peter Nilsson  <hp@axis.com>

   Making sure that invalid asm operand modifiers don't cause an ICE.  */

/* { dg-do compile } */
/* { dg-options "-O2" } */
/* { dg-message "reg:SI|const_double:DF" "prune debug_rtx output" { target *-*-* } 0 } */

void
foo (void)
{
  /* The first case symbolizes the default case for CRIS.  */
  asm ("\n;# %w0" : : "r" (0));	/* { dg-error "modifier" } */

  /* These are explicit cases.  Luckily, a register is invalid in most of
     them.  */
  asm ("\n;# %b0" : : "r" (0));		/* { dg-error "modifier" } */
  asm ("\n;# %v0" : : "r" (0));		/* { dg-error "modifier" } */
  asm ("\n;# %P0" : : "r" (0));		/* { dg-error "modifier" } */
  asm ("\n;# %p0" : : "r" (0));		/* { dg-error "modifier" } */
  asm ("\n;# %z0" : : "r" (0));		/* { dg-error "modifier" } */
  asm ("\n;# %H0" : : "F" (0.5));	/* { dg-error "modifier" } */
  asm ("\n;# %e0" : : "r" (0));		/* { dg-error "modifier" } */
  asm ("\n;# %m0" : : "r" (0));		/* { dg-error "modifier" } */
  asm ("\n;# %A0" : : "r" (0));		/* { dg-error "modifier" } */
  asm ("\n;# %D0" : : "r" (0));		/* { dg-error "modifier" } */
  asm ("\n;# %T0" : : "r" (0));		/* { dg-error "modifier" } */
  /* Add more must-not-ICE asm errors here as we find them ICEing.  */
}