2007-08-23 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 23 Aug 2007 13:36:43 +0000 (13:36 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 23 Aug 2007 13:36:43 +0000 (13:36 +0000)
* tree-pretty-print.c (dump_generic_node): Annotate
GIMPLE_MODIFY_STMTs with volatile ops with "{v}".

* gcc.dg/tree-ssa/fprinf-1.c: Adjust patterns.
* gcc.dg/tree-ssa/fprinf-chk-1.c: Likewise.
* gcc.dg/tree-ssa/prinf-1.c: Likewise.
* gcc.dg/tree-ssa/prinf-chk-1.c: Likewise.
* gcc.dg/tree-ssa/vfprinf-chk-1.c: Likewise.
* gcc.dg/tree-ssa/vfprinf-chk-1.c: Likewise.
* gcc.dg/tree-ssa/vprinf-chk-1.c: Likewise.
* gcc.dg/tree-ssa/vprinf-chk-1.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127741 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-1.c
gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-chk-1.c
gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-1.c
gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-chk-1.c
gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-1.c
gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-chk-1.c
gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-1.c
gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-chk-1.c
gcc/tree-pretty-print.c

index fbfee2b..19b4f02 100644 (file)
@@ -1,5 +1,10 @@
 2007-08-23  Richard Guenther  <rguenther@suse.de>
 
+       * tree-pretty-print.c (dump_generic_node): Annotate
+       GIMPLE_MODIFY_STMTs with volatile ops with "{v}".
+
+2007-08-23  Richard Guenther  <rguenther@suse.de>
+
        * builtins.c (expand_builtin_mathfn): Wrap argument in
        save_expr directly instead of re-building the call.
        (expand_builtin_mathfn_2): Likewise.
index 1fb55d5..8e350b2 100644 (file)
@@ -1,3 +1,14 @@
+2007-08-23  Richard Guenther  <rguenther@suse.de>
+
+       * gcc.dg/tree-ssa/fprinf-1.c: Adjust patterns.
+       * gcc.dg/tree-ssa/fprinf-chk-1.c: Likewise.
+       * gcc.dg/tree-ssa/prinf-1.c: Likewise.
+       * gcc.dg/tree-ssa/prinf-chk-1.c: Likewise.
+       * gcc.dg/tree-ssa/vfprinf-chk-1.c: Likewise.
+       * gcc.dg/tree-ssa/vfprinf-chk-1.c: Likewise.
+       * gcc.dg/tree-ssa/vprinf-chk-1.c: Likewise.
+       * gcc.dg/tree-ssa/vprinf-chk-1.c: Likewise.
+
 2007-08-23  Uros Bizjak  <ubizjak@gmail.com>
 
        * gcc.target/s390: New directory.
index 5ad257b..b08e124 100644 (file)
@@ -32,7 +32,7 @@ void test (void)
 /* { dg-final { scan-tree-dump "vi0.*fwrite.*\"hello\".*1, 5, fp.*vi1" "fab"} } */
 /* { dg-final { scan-tree-dump "vi1.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi2" "fab"} } */
 /* { dg-final { scan-tree-dump "vi2.*fputc.*fp.*vi3" "fab"} } */
-/* { dg-final { scan-tree-dump "vi3 = 0\[^\(\)\]*vi4 = 0" "fab"} } */
+/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab"} } */
 /* { dg-final { scan-tree-dump "vi4.*fwrite.*\"hello\".*1, 5, fp.*vi5" "fab"} } */
 /* { dg-final { scan-tree-dump "vi5.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi6" "fab"} } */
 /* { dg-final { scan-tree-dump "vi6.*fputc.*fp.*vi7" "fab"} } */
index f55a78d..93e38cb 100644 (file)
@@ -32,7 +32,7 @@ void test (void)
 /* { dg-final { scan-tree-dump "vi0.*fwrite.*\"hello\".*1, 5, fp.*vi1" "fab"} } */
 /* { dg-final { scan-tree-dump "vi1.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi2" "fab"} } */
 /* { dg-final { scan-tree-dump "vi2.*fputc.*fp.*vi3" "fab"} } */
-/* { dg-final { scan-tree-dump "vi3 = 0\[^\(\)\]*vi4 = 0" "fab"} } */
+/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab"} } */
 /* { dg-final { scan-tree-dump "vi4.*fwrite.*\"hello\".*1, 5, fp.*vi5" "fab"} } */
 /* { dg-final { scan-tree-dump "vi5.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi6" "fab"} } */
 /* { dg-final { scan-tree-dump "vi6.*fputc.*fp.*vi7" "fab"} } */
index 07be245..a78d088 100644 (file)
@@ -32,11 +32,11 @@ void test (void)
 /* { dg-final { scan-tree-dump "vi0.*printf.*\"hello\".*vi1" "fab"} } */
 /* { dg-final { scan-tree-dump "vi1.*puts.*\"hello\".*vi2" "fab"} } */
 /* { dg-final { scan-tree-dump "vi2.*putchar.*vi3" "fab"} } */
-/* { dg-final { scan-tree-dump "vi3 = 0\[^\(\)\]*vi4 = 0" "fab"} } */
+/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab"} } */
 /* { dg-final { scan-tree-dump "vi4.*printf.*\"hello\".*vi5" "fab"} } */
 /* { dg-final { scan-tree-dump "vi5.*puts.*\"hello\".*vi6" "fab"} } */
 /* { dg-final { scan-tree-dump "vi6.*putchar.*vi7" "fab"} } */
-/* { dg-final { scan-tree-dump "vi7 = 0\[^\(\)\]*vi8 = 0" "fab"} } */
+/* { dg-final { scan-tree-dump "vi7 ={v} 0\[^\(\)\]*vi8 ={v} 0" "fab"} } */
 /* { dg-final { scan-tree-dump "vi8.*putchar.*vi9" "fab"} } */
 /* { dg-final { scan-tree-dump "vi9.*puts.*\"hello\\\\n\".*via" "fab"} } */
 /* { dg-final { cleanup-tree-dump "fab" } } */
index f4d75b3..2f85b28 100644 (file)
@@ -32,11 +32,11 @@ void test (void)
 /* { dg-final { scan-tree-dump "vi0.*__printf_chk.*1.*\"hello\".*vi1" "fab"} } */
 /* { dg-final { scan-tree-dump "vi1.*puts.*\"hello\".*vi2" "fab"} } */
 /* { dg-final { scan-tree-dump "vi2.*putchar.*vi3" "fab"} } */
-/* { dg-final { scan-tree-dump "vi3 = 0\[^\(\)\]*vi4 = 0" "fab"} } */
+/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab"} } */
 /* { dg-final { scan-tree-dump "vi4.*__printf_chk.*1.*\"hello\".*vi5" "fab"} } */
 /* { dg-final { scan-tree-dump "vi5.*puts.*\"hello\".*vi6" "fab"} } */
 /* { dg-final { scan-tree-dump "vi6.*putchar.*vi7" "fab"} } */
-/* { dg-final { scan-tree-dump "vi7 = 0\[^\(\)\]*vi8 = 0" "fab"} } */
+/* { dg-final { scan-tree-dump "vi7 ={v} 0\[^\(\)\]*vi8 ={v} 0" "fab"} } */
 /* { dg-final { scan-tree-dump "vi8.*putchar.*vi9" "fab"} } */
 /* { dg-final { scan-tree-dump "vi9.*puts.*\"hello\\\\n\".*via" "fab"} } */
 /* { dg-final { cleanup-tree-dump "fab" } } */
index 3a48e78..1083f13 100644 (file)
@@ -32,7 +32,7 @@ test (va_list ap1, va_list ap2, va_list ap3, va_list ap4, va_list ap5,
 /* { dg-final { scan-tree-dump "vi0.*fwrite.*\"hello\".*1, 5, fp.*vi1" "fab"} } */
 /* { dg-final { scan-tree-dump "vi1.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi2" "fab"} } */
 /* { dg-final { scan-tree-dump "vi2.*fputc.*fp.*vi3" "fab"} } */
-/* { dg-final { scan-tree-dump "vi3 = 0\[^\(\)\]*vi4 = 0" "fab"} } */
+/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab"} } */
 /* { dg-final { scan-tree-dump "vi4.*vfprintf.*\"%s\".*vi5" "fab"} } */
 /* { dg-final { scan-tree-dump "vi5.*vfprintf.*\"%c\".*vi6" "fab"} } */
 /* { dg-final { scan-tree-dump "vi6.*vfprintf.*\"%s\\\\n\".*vi7" "fab"} } */
index 9b99561..ce767d1 100644 (file)
@@ -32,7 +32,7 @@ test (va_list ap1, va_list ap2, va_list ap3, va_list ap4, va_list ap5,
 /* { dg-final { scan-tree-dump "vi0.*fwrite.*\"hello\".*1, 5, fp.*vi1" "fab"} } */
 /* { dg-final { scan-tree-dump "vi1.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi2" "fab"} } */
 /* { dg-final { scan-tree-dump "vi2.*fputc.*fp.*vi3" "fab"} } */
-/* { dg-final { scan-tree-dump "vi3 = 0\[^\(\)\]*vi4 = 0" "fab"} } */
+/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab"} } */
 /* { dg-final { scan-tree-dump "vi4.*__vfprintf_chk.*fp.*1.*\"%s\".*vi5" "fab"} } */
 /* { dg-final { scan-tree-dump "vi5.*__vfprintf_chk.*fp.*1.*\"%c\".*vi6" "fab"} } */
 /* { dg-final { scan-tree-dump "vi6.*__vfprintf_chk.*fp.*1.*\"%s\\\\n\".*vi7" "fab"} } */
index 5dea916..416ee5b 100644 (file)
@@ -30,7 +30,7 @@ test (va_list ap1, va_list ap2, va_list ap3, va_list ap4, va_list ap5,
 /* { dg-final { scan-tree-dump "vi0.*vprintf.*\"hello\".*vi1" "fab"} } */
 /* { dg-final { scan-tree-dump "vi1.*puts.*\"hello\".*vi2" "fab"} } */
 /* { dg-final { scan-tree-dump "vi2.*putchar.*vi3" "fab"} } */
-/* { dg-final { scan-tree-dump "vi3 = 0\[^\(\)\]*vi4 = 0" "fab"} } */
+/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab"} } */
 /* { dg-final { scan-tree-dump "vi4.*vprintf.*\"%s\".*vi5" "fab"} } */
 /* { dg-final { scan-tree-dump "vi5.*vprintf.*\"%c\".*vi6" "fab"} } */
 /* { dg-final { scan-tree-dump "vi6.*vprintf.*\"%s\\\\n\".*vi7" "fab"} } */
index c3ccbfa..567a3df 100644 (file)
@@ -30,7 +30,7 @@ test (va_list ap1, va_list ap2, va_list ap3, va_list ap4, va_list ap5,
 /* { dg-final { scan-tree-dump "vi0.*__vprintf_chk.*1.*\"hello\".*vi1" "fab"} } */
 /* { dg-final { scan-tree-dump "vi1.*puts.*\"hello\".*vi2" "fab"} } */
 /* { dg-final { scan-tree-dump "vi2.*putchar.*vi3" "fab"} } */
-/* { dg-final { scan-tree-dump "vi3 = 0\[^\(\)\]*vi4 = 0" "fab"} } */
+/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab"} } */
 /* { dg-final { scan-tree-dump "vi4.*__vprintf_chk.*1.*\"%s\".*vi5" "fab"} } */
 /* { dg-final { scan-tree-dump "vi5.*__vprintf_chk.*1.*\"%c\".*vi6" "fab"} } */
 /* { dg-final { scan-tree-dump "vi6.*__vprintf_chk.*1.*\"%s\\\\n\".*vi7" "fab"} } */
index 540e611..265a56a 100644 (file)
@@ -1081,6 +1081,13 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags,
       if (TREE_CODE (node) == GIMPLE_MODIFY_STMT
          && MOVE_NONTEMPORAL (node))
        pp_string (buffer, "{nt}");
+      if (TREE_CODE (node) == GIMPLE_MODIFY_STMT)
+       {
+       stmt_ann_t ann;
+        if ((ann = stmt_ann (node))
+           && ann->has_volatile_ops)
+         pp_string (buffer, "{v}");
+        }
       pp_space (buffer);
       dump_generic_node (buffer, GENERIC_TREE_OPERAND (node, 1), spc, flags,
                         false);