mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-27 04:55:01 +08:00
fefbfa2166
2004-10-02 Frank Ch. Eigler <fche@redhat.com> * tree-mudflap.c (mf_build_check_statement_for): Reorganize to take check-base and -limit arguments. (mf_xform_derefs_1): Reorganize slightly to pass proper base/limit check ranges for ARRAY_REF and COMPONENT_REF. (execute_mudflap_fnction_ops, ..._decls): Limit unnecessary instrumentation. 2004-10-02 Frank Ch. Eigler <fche@redhat.com> * testsuite/libmudflap.c/pass50-frag.c, fail33-frag.c, fail34-frag.c: New tests for proper base/limit checking for aggregates. From-SVN: r88432
30 lines
341 B
C
30 lines
341 B
C
#include <stdlib.h>
|
|
|
|
struct a
|
|
{
|
|
int a1[5];
|
|
union
|
|
{
|
|
int b1[5];
|
|
struct
|
|
{
|
|
int c1;
|
|
int c2;
|
|
} b2[4];
|
|
} a2[8];
|
|
};
|
|
|
|
int i1 = 5;
|
|
int i2 = 2;
|
|
int i3 = 6;
|
|
int i4 = 0;
|
|
|
|
int
|
|
main ()
|
|
{
|
|
volatile struct a *k = calloc (1, sizeof (struct a));
|
|
k->a2[i1].b1[i2] = k->a2[i3].b2[i4].c2;
|
|
free ((void *) k);
|
|
return 0;
|
|
}
|