This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: PR fortran/39594: [4.5 Regression] Revision 145309 caused ICE in emit_swap_insn, at reg-stack.c:827


Hi,

Vladimir reverted revision 145309 to fix PRs rtl-optimization/39607 and
rtl-optimization/39631.  I am checking this patch into trunk and 4.4
branch to add a testcase for PR rtl-optimization/39607.


H.J.
---
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 145521)
+++ ChangeLog	(working copy)
@@ -1,3 +1,7 @@
+2009-04-03  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* g++.dg/opt/pr39607.C: New.
+
 2009-04-03  Tobias Burnus  <burnus@net-b.de>
 
 	PR fortran/39594
Index: g++.dg/opt/pr39607.C
===================================================================
--- g++.dg/opt/pr39607.C	(revision 0)
+++ g++.dg/opt/pr39607.C	(revision 0)
@@ -0,0 +1,65 @@
+// PR rtl-optimization/39607
+// { dg-do compile }
+// { dg-options "-O2" }
+
+void abcErrorMessage(int error);
+enum AbcSurfType {
+    SURF_U,
+    SURF_V
+};
+class AbcVec2d
+{
+public:
+    double x;
+    double y;
+};
+class AbcIval1d
+{
+protected:
+    double m_dMin;
+    double m_dMax;
+public:
+    AbcIval1d();
+    AbcIval1d(double dMin, double dMax);
+    double GetMax() const { return m_dMax; }
+    double GetMin() const { return m_dMin; }
+};
+inline AbcIval1d::AbcIval1d(double dMin, double dMax)
+{
+    if (dMin > dMax) {
+        abcErrorMessage(1);
+    }
+    else {
+        m_dMin = dMin;
+        m_dMax = dMax;
+    }
+}
+class AbcIval2d
+{
+protected:
+    AbcVec2d m_vMin;
+    AbcVec2d m_vMax;
+public:
+    AbcVec2d GetMax() const { return m_vMax; }
+    AbcVec2d GetMin() const { return m_vMin; }
+};
+class AbcCone
+{
+protected:
+    int m_uv;    	
+public:
+    AbcIval2d GetNaturalUVDomain() const;
+    AbcIval1d GetLinearParamIval(AbcSurfType * pSurfParam) const;
+};
+AbcIval1d AbcCone::GetLinearParamIval(AbcSurfType * pSurfParam) const
+{
+    AbcIval1d sIval;
+    AbcIval2d sUVDomain = GetNaturalUVDomain();
+    if (m_uv) {    
+        sIval = AbcIval1d(sUVDomain.GetMin().x,sUVDomain.GetMax().x);
+    }
+    else { 
+        sIval = AbcIval1d(sUVDomain.GetMin().y,sUVDomain.GetMax().y);
+    }
+    return sIval;
+}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]