mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-14 08:10:27 +08:00
tree.c (new_alias_set): New function.
* tree.c (new_alias_set): New function. * tree.h (new_alias_set): Declare it. * c-common.c (c_get_alias_set): Use it. From-SVN: r22504
This commit is contained in:
parent
899f1ed698
commit
2ba573431e
@ -1,3 +1,9 @@
|
||||
Sun Sep 20 19:01:51 1998 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
* tree.c (new_alias_set): New function.
|
||||
* tree.h (new_alias_set): Declare it.
|
||||
* c-common.c (c_get_alias_set): Use it.
|
||||
|
||||
Sun Sep 20 12:35:55 1998 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
* fold-const.c (fold): Yet another COND_EXPR bug: when folding
|
||||
|
@ -2984,7 +2984,6 @@ int
|
||||
c_get_alias_set (t)
|
||||
tree t;
|
||||
{
|
||||
static int next_set = 0;
|
||||
tree type;
|
||||
|
||||
if (t == error_mark_node)
|
||||
@ -3060,6 +3059,6 @@ c_get_alias_set (t)
|
||||
|
||||
/* TYPE is something we haven't seen before. Put it in a new alias
|
||||
set. */
|
||||
TYPE_ALIAS_SET (type) = ++next_set;
|
||||
TYPE_ALIAS_SET (type) = new_alias_set ();
|
||||
return TYPE_ALIAS_SET (type);
|
||||
}
|
||||
|
12
gcc/tree.c
12
gcc/tree.c
@ -5061,7 +5061,8 @@ expr_check (node, ignored, file, line, nofatal)
|
||||
/* Return the alias set for T, which may be either a type or an
|
||||
expression. */
|
||||
|
||||
int get_alias_set (t)
|
||||
int
|
||||
get_alias_set (t)
|
||||
tree t;
|
||||
{
|
||||
if (!flag_strict_aliasing || !lang_get_alias_set)
|
||||
@ -5071,3 +5072,12 @@ int get_alias_set (t)
|
||||
else
|
||||
return (*lang_get_alias_set) (t);
|
||||
}
|
||||
|
||||
/* Return a brand-new alias set. */
|
||||
|
||||
int
|
||||
new_alias_set ()
|
||||
{
|
||||
static int last_alias_set;
|
||||
return ++last_alias_set;
|
||||
}
|
||||
|
@ -1865,6 +1865,7 @@ extern tree get_set_constructor_bits PROTO((tree, char *, int));
|
||||
extern tree get_set_constructor_bytes PROTO((tree,
|
||||
unsigned char *, int));
|
||||
extern int get_alias_set PROTO((tree));
|
||||
extern int new_alias_set PROTO((void));
|
||||
extern int (*lang_get_alias_set) PROTO((tree));
|
||||
|
||||
/* In stmt.c */
|
||||
|
Loading…
x
Reference in New Issue
Block a user