OSDN Git Service

PR target/43662
authorjiez <jiez@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 19 Apr 2010 10:02:52 +0000 (10:02 +0000)
committerjiez <jiez@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 19 Apr 2010 10:02:52 +0000 (10:02 +0000)
* reginfo.c (reinit_regs): Set caller_save_initialized_p
to false.

testsuite/
PR target/43662
* gcc.target/i386/pr43662.c: New test.

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

gcc/ChangeLog
gcc/reginfo.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr43662.c [new file with mode: 0644]

index 98c8004..23f76a3 100644 (file)
@@ -1,3 +1,9 @@
+2010-04-19  Jie Zhang  <jie@codesourcery.com>
+
+       PR target/43662
+       * reginfo.c (reinit_regs): Set caller_save_initialized_p
+       to false.
+
 2010-04-19 Ira Rosen <irar@il.ibm.com>
 
        PR tree-optimization/37027
index ee6c7ee..bf43d70 100644 (file)
@@ -666,6 +666,8 @@ void
 reinit_regs (void)
 {
   init_regs ();
+  /* caller_save needs to be re-initialized.  */
+  caller_save_initialized_p = false;
   ira_init ();
 }
 
index 8215f83..01a2602 100644 (file)
@@ -1,3 +1,8 @@
+2010-04-19  Jie Zhang  <jie@codesourcery.com>
+
+       PR target/43662
+       * gcc.target/i386/pr43662.c: New test.
+
 2010-04-19  Dodji Seketeli  <dodji@redhat.com>
 
        PR c++/43704
diff --git a/gcc/testsuite/gcc.target/i386/pr43662.c b/gcc/testsuite/gcc.target/i386/pr43662.c
new file mode 100644 (file)
index 0000000..246c8aa
--- /dev/null
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-options "-O2" } */
+
+void __attribute__ ((ms_abi)) foo (void)
+{
+}
+
+typedef struct _IAVIStreamImpl
+{
+  int sInfo;
+  int has;
+} IAVIStreamImpl;
+
+extern int __attribute__ ((ms_abi)) aso (void *);
+extern int sre (void *);
+
+int AVIFILE_OpenCompressor (IAVIStreamImpl *This)
+{
+  if (This->has != 0)
+    aso (&This->has);
+  sre (&This->sInfo);
+  return 0;
+}