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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [pr37561.c] - Blame information for rev 750

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* PR c++/37561 */
2
/* { dg-do compile } */
3
 
4
__extension__ __PTRDIFF_TYPE__ p;
5
char q;
6
 
7
void
8
foo ()
9
{
10
  ((char *) p)++;       /* { dg-error "lvalue" } */
11
  ((char *) q)++;       /* { dg-error "lvalue" } */
12
  ((char *) p)--;       /* { dg-error "lvalue" } */
13
  ((char *) q)--;       /* { dg-error "lvalue" } */
14
  ++(char *) p;         /* { dg-error "lvalue" } */
15
  ++(char *) q;         /* { dg-error "lvalue" } */
16
  --(char *) p;         /* { dg-error "lvalue" } */
17
  --(char *) q;         /* { dg-error "lvalue" } */
18
}
19
 
20
/* { dg-warning "cast to pointer from integer of different size" "" { target *-*-* } 11 } */
21
/* { dg-warning "cast to pointer from integer of different size" "" { target *-*-* } 13 } */
22
/* { dg-warning "cast to pointer from integer of different size" "" { target *-*-* } 15 } */
23
/* { dg-warning "cast to pointer from integer of different size" "" { target *-*-* } 17 } */

powered by: WebSVN 2.1.0

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