diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-10-15 16:57:39 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-10-15 16:57:39 +0000 |
commit | 189575ff71a07f2f922fcb2235b5a370e7567804 (patch) | |
tree | 830927e618b1f70bf6cd897de8342dd13e3a6d14 | |
parent | 856b292cc2295f87b1cfd1c10b3d55586bcdc394 (diff) | |
download | ppe42-gcc-189575ff71a07f2f922fcb2235b5a370e7567804.tar.gz ppe42-gcc-189575ff71a07f2f922fcb2235b5a370e7567804.zip |
PR middle-end/29111
* builtins.c (get_pointer_alignment): Return 0 if TER is not run.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117750 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/builtins.c | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 44a0eee75ce..078db2bb354 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2006-10-15 Eric Botcazou <ebotcazou@libertysurf.fr> + John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + Andrew Pinski <pinskia@gmail.com> + + PR middle-end/29111 + * builtins.c (get_pointer_alignment): Return 0 if TER is not run. + 2006-10-15 Jan Hubicka <jh@suse.cz> Richard Guenther <rguenther@suse.de> diff --git a/gcc/builtins.c b/gcc/builtins.c index 46f97f9c879..7fe32b160a4 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -235,6 +235,10 @@ get_pointer_alignment (tree exp, unsigned int max_align) if (! POINTER_TYPE_P (TREE_TYPE (exp))) return 0; + /* We rely on TER to compute accurate alignment information. */ + if (!(optimize && flag_tree_ter)) + return 0; + align = TYPE_ALIGN (TREE_TYPE (TREE_TYPE (exp))); align = MIN (align, max_align); |