URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 275 |
Rev 384 |
#include <stdio.h>
|
#include <stdio.h>
|
#include <stdlib.h>
|
#include <stdlib.h>
|
#include <string.h>
|
#include <string.h>
|
int main ()
|
int main ()
|
{
|
{
|
struct base {
|
struct base {
|
int basic;
|
int basic;
|
};
|
};
|
|
|
struct derived {
|
struct derived {
|
struct base common;
|
struct base common;
|
char extra;
|
char extra;
|
};
|
};
|
|
|
volatile struct base b;
|
volatile struct base b;
|
volatile struct base *bp;
|
volatile struct base *bp;
|
|
|
bp = (struct base *)&b;
|
bp = (struct base *)&b;
|
|
|
bp->basic = 10;
|
bp->basic = 10;
|
((struct derived volatile *)bp)->extra = 'x';
|
((struct derived volatile *)bp)->extra = 'x';
|
return 0;
|
return 0;
|
}
|
}
|
/* { dg-output "mudflap violation 1.*" } */
|
/* { dg-output "mudflap violation 1.*" } */
|
/* { dg-output "Nearby object 1.*" } */
|
/* { dg-output "Nearby object 1.*" } */
|
/* { dg-output "mudflap object.*.main. b.*" } */
|
/* { dg-output "mudflap object.*.main. b.*" } */
|
/* { dg-do run { xfail *-*-* } } */
|
/* { dg-do run { xfail *-*-* } } */
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.