aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@libertysurf.fr>2006-10-15 18:57:39 +0200
committerEric Botcazou <ebotcazou@gcc.gnu.org>2006-10-15 16:57:39 +0000
commitaf4a46a96391d2e999fc402be05842cf8cee2368 (patch)
tree830927e618b1f70bf6cd897de8342dd13e3a6d14 /gcc
parent76c29bf0b242543171f4a7383719c95904eb31ec (diff)
downloadgcc-af4a46a96391d2e999fc402be05842cf8cee2368.zip
gcc-af4a46a96391d2e999fc402be05842cf8cee2368.tar.gz
gcc-af4a46a96391d2e999fc402be05842cf8cee2368.tar.bz2
re PR middle-end/29111 (FAIL: gcc.dg/torture/pr26565.c -O0 execution test)
PR middle-end/29111 * builtins.c (get_pointer_alignment): Return 0 if TER is not run. Co-Authored-By: Andrew Pinski <pinskia@gmail.com> Co-Authored-By: John David Anglin <dave.anglin@nrc-cnrc.gc.ca> From-SVN: r117750
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/builtins.c4
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 44a0eee..078db2b 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 46f97f9..7fe32b1 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);