OSDN Git Service

2007-02-23 Paolo Bonzini <bonzini@gnu.org>
authorbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 24 Feb 2007 16:07:41 +0000 (16:07 +0000)
committerbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 24 Feb 2007 16:07:41 +0000 (16:07 +0000)
        PR tree-optimization/30904
* gcc.dg/pr30904.c: New test.

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

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr30904.c [new file with mode: 0644]

index 8b91645..26ad4bf 100644 (file)
@@ -1,3 +1,8 @@
+2007-02-23  Paolo Bonzini  <bonzini@gnu.org>
+
+        PR tree-optimization/30904
+       * gcc.dg/pr30904.c: New test.
+
 2007-02-23  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
 
        * gcc.test-framework/README: Correct command.
diff --git a/gcc/testsuite/gcc.dg/pr30904.c b/gcc/testsuite/gcc.dg/pr30904.c
new file mode 100644 (file)
index 0000000..bcd9048
--- /dev/null
@@ -0,0 +1,18 @@
+/* { dg-do link } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+extern int t;
+extern void link_error(void);
+int main (void)
+{
+      struct { unsigned int a : 7; } s;
+      s.a = t;
+      if (s.a >> 8)
+          link_error ();
+      if (s.a >> 9)
+          link_error ();
+}
+
+
+/* { dg-final { scan-tree-dump-times "link_error" 0 "optimized" { xfail *-*-* } } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */