mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-16 04:20:03 +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
23 lines
396 B
C
23 lines
396 B
C
#include <stdlib.h>
|
|
|
|
struct s
|
|
{
|
|
int a1[4];
|
|
};
|
|
|
|
struct s a, b;
|
|
int idx = 7; /* should pass to the next object */
|
|
|
|
int
|
|
main ()
|
|
{
|
|
int i, j=0;
|
|
int a_before_b = (& a < & b);
|
|
j = (a_before_b ? a.a1[idx] : b.a1[idx]);
|
|
return j;
|
|
}
|
|
/* { dg-output "mudflap violation 1.*" } */
|
|
/* { dg-output "Nearby object.*" } */
|
|
/* { dg-output "mudflap object.*\[ab\]" } */
|
|
/* { dg-do run { xfail *-*-* } } */
|