re PR tree-optimization/33173 (ICE in set_uids_in_ptset, at tree-ssa-structalias.c:4704)

2007-08-27  Daniel Berlin  <dberlin@dberlin.org>
	
	Fix PR tree-optimization/33173
	* tree-ssa-alias.c (find_used_portions): Fix reversed test.

From-SVN: r127834
This commit is contained in:
Daniel Berlin 2007-08-27 14:18:36 +00:00 committed by Daniel Berlin
parent 62d7517976
commit 11df3da358
5 changed files with 115 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2007-08-27 Daniel Berlin <dberlin@dberlin.org>
Fix PR tree-optimization/33173
* tree-ssa-alias.c (find_used_portions): Fix reversed test.
2007-08-27 H.J. Lu <hongjiu.lu@intel.com>
PR target/31385

View File

@ -1,3 +1,9 @@
2007-08-27 Daniel Berlin <dberlin@dberlin.org>
PR tree-optimization/33173
* gcc.c-torture/compile/pr33173.c: New.
2007-08-27 H.J. Lu <hongjiu.lu@intel.com>
PR target/31385

View File

@ -0,0 +1,102 @@
typedef long unsigned int size_t;
typedef struct
{
}
_G_fpos_t;
extern int printf (__const char *__restrict __format, ...);
extern size_t strlen (__const char *__s) __attribute__ ((__nothrow__))
__attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
typedef struct rend_service_descriptor_t
{
int patchlevel;
char status_tag[32];
}
tor_version_t;
test_dir_format (void)
{
tor_version_t ver1;
{
long v2 = (long) (ver1.patchlevel);
}
{
const char *v1 = (""), *v2 = (ver1.status_tag);
if (!__extension__ (
{
size_t __s1_len, __s2_len;
(__builtin_constant_p (v1)
&& (__s1_len = strlen (v1), __s2_len =
(!((size_t) (const void *) ((v1) + 1) -
(size_t) (const void *) (v1) == 1)
|| __s1_len >= 4)
&&
(!((size_t) (const void *) ((v2) + 1) -
(size_t) (const void *) (v2) == 1)
|| __s2_len >= 4)) ? __builtin_strcmp (v1,
v2)
: (__builtin_constant_p (v1)
&& ((size_t) (const void *) ((v1) + 1) -
__s1_len < 4) ? (__builtin_constant_p (v2)
&&
((size_t) (const void *)
(size_t) (const void
*) (v2) ==
1) ? __builtin_strcmp (v1,
v2)
: (__extension__ (
{
__const
char
*__s2
=
(__const
char
*)
(v2);
register
__result
=
(((__const unsigned char *) (__const char *) (v1))[0] - __s2[0]); if (__s1_len > 0 && __result == 0)
{
}
__result;}
))):
(__builtin_constant_p (v2)
&& ((size_t) (const void *) ((v2) + 1) -
__s2_len < 4) ? (__builtin_constant_p (v1)
&& ((size_t) (const void *)
1) ?
__builtin_strcmp (v1,
v2)
: (__extension__ (
{
__const
char
*__s1
=
(__const
char
*)
(__const
*)
(v1);
register
__result
=
((__const unsigned char *) (__const char *) (v2))[0]; if (__s2_len > 0 && __result == 0)
{
if
(__s2_len
==
0)
{
}
}
__result;}
))): __builtin_strcmp (v1,
v2))));}
))
{
printf (".");
}
}
}

View File

@ -16,5 +16,5 @@ int foo(void)
return a.i;
}
/* { dg-final { scan-tree-dump-times "VDEF" 2 "salias" } } */
/* { dg-final { scan-tree-dump-times "VDEF" 4 "salias" } } */
/* { dg-final { cleanup-tree-dump "salias" } } */

View File

@ -3967,7 +3967,7 @@ find_used_portions (tree *tp, int *walk_subtrees, void *lhs_p)
for (i = 0; i < nargs; i++)
{
tree *arg = &CALL_EXPR_ARG (*tp, i);
if (TREE_CODE (*arg) != ADDR_EXPR)
if (TREE_CODE (*arg) == ADDR_EXPR)
find_used_portions (arg, walk_subtrees, NULL);
}
*walk_subtrees = 0;