re PR middle-end/29111 (FAIL: gcc.dg/torture/pr26565.c -O0 execution test)
authorEric Botcazou <ebotcazou@libertysurf.fr>
Sun, 15 Oct 2006 16:57:39 +0000 (18:57 +0200)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sun, 15 Oct 2006 16:57:39 +0000 (16:57 +0000)
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

gcc/ChangeLog
gcc/builtins.c

index 44a0eee75cef203f80d8661277a8949acfb436a8..078db2bb3544d04371d2516e5c8566ede6194315 100644 (file)
@@ -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>
 
index 46f97f9c87906fce0a065619a39a6e4c693c3899..7fe32b160a43a30dfb1656e1f54d306ba42f3bcd 100644 (file)
@@ -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);