gcc/libmudflap/testsuite/libmudflap.c/fail35-frag.c
Frank Ch. Eigler 306ae32b68 fail35-,pass53-,pass54-frag.c: New tests.
2004-10-28  Frank Ch. Eigler  <fche@redhat.com>

	* testsuite/libmudflap.c/fail35-,pass53-,pass54-frag.c: New tests.
	* testsuite/libmudflap.c/pass35-frag.c: Correct embedded warning
	message.

From-SVN: r89783
2004-10-28 21:21:59 +00:00

24 lines
465 B
C

#include <stdlib.h>
struct k
{
int p;
struct {
int m;
} q;
};
int
main ()
{
volatile struct k *l = malloc (sizeof (int)); /* make it only big enough for k.p */
/* Confirm that we instrument this nested construct
COMPONENT_REF(COMPONENT_REF(INDIRECT_REF)). */
l->q.m = 5;
return 0;
}
/* { dg-output "mudflap violation 1.*" } */
/* { dg-output "Nearby object.*" } */
/* { dg-output "mudflap object.*" } */
/* { dg-do run { xfail *-*-* } } */