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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [invalid-call-1.c] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* PR rtl-optimization/29841 */
2
/* Testcase by Khem Raj <raj.khem@gmail.com> */
3
 
4
/* { dg-do compile } */
5
/* { dg-options "-O2" } */
6
/* { dg-options "-O2 -march=i586" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
7
 
8
typedef void (*fp)(void);
9
extern char* bar(void* a1, int a2);
10
extern char* mar(int n);
11
char* cptr;
12
 
13
void foo()
14
{
15
  cptr = mar(6);
16
  ((char *(*)(void *,int (*)(void *,unsigned char **),char**))((fp)bar))(0,0,(void*)(0)); /* { dg-warning "function called through a non-compatible type" "non-compatible type" } */
17
  /* { dg-message "note: if this code is reached, the program will abort" "" { target *-*-* } 16 } */
18
}

powered by: WebSVN 2.1.0

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