OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [pr48552-2.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* PR c/48552 */
2
/* { dg-do compile } */
3
/* { dg-options "" } */
4
 
5
struct S;
6
 
7
void
8
f1 (void *x)
9
{
10
  __asm ("" : : "r" (*x));      /* { dg-warning "dereferencing" } */
11
}                               /* { dg-error "invalid use of void expression" "" { target *-*-* } 10 } */
12
 
13
void
14
f2 (void *x)
15
{
16
  __asm ("" : "=r" (*x));       /* { dg-warning "dereferencing" } */
17
}                               /* { dg-error "invalid use of void expression" "" { target *-*-* } 16 } */
18
                                /* { dg-error "invalid lvalue in asm output 0" "" { target *-*-* } 16 } */
19
void
20
f3 (void *x)
21
{
22
  __asm ("" : : "m" (*x));      /* { dg-warning "dereferencing" } */
23
}
24
 
25
void
26
f4 (void *x)
27
{
28
  __asm ("" : "=m" (*x));       /* { dg-warning "dereferencing" } */
29
}
30
 
31
void
32
f5 (void *x)
33
{
34
  __asm ("" : : "g" (*x));      /* { dg-warning "dereferencing" } */
35
}                               /* { dg-error "invalid use of void expression" "" { target *-*-* } 34 } */
36
 
37
void
38
f6 (void *x)
39
{
40
  __asm ("" : "=g" (*x));       /* { dg-warning "dereferencing" } */
41
}                               /* { dg-error "invalid use of void expression" "" { target *-*-* } 40 } */
42
                                /* { dg-error "invalid lvalue in asm output 0" "" { target *-*-* } 40 } */
43
void
44
f7 (struct S *x)
45
{
46
  __asm ("" : : "r" (*x));      /* { dg-error "dereferencing pointer to incomplete type" } */
47
}
48
 
49
void
50
f8 (struct S *x)
51
{
52
  __asm ("" : "=r" (*x));       /* { dg-error "dereferencing pointer to incomplete type" } */
53
}                               /* { dg-error "invalid lvalue in asm output 0" "" { target *-*-* } 52 } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.