Author: martin
Date: 2005-05-18 04:58:03 -0400 (Wed, 18 May 2005)
New Revision: 44666

Modified:
   trunk/mcs/gmcs/ChangeLog
   trunk/mcs/gmcs/flowanalysis.cs
Log:
2005-05-18  Martin Baulig  <[EMAIL PROTECTED]>

        * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
        a loop and may leave it, reset the barrier; fixes #74974.



Modified: trunk/mcs/gmcs/ChangeLog
===================================================================
--- trunk/mcs/gmcs/ChangeLog    2005-05-18 07:01:26 UTC (rev 44665)
+++ trunk/mcs/gmcs/ChangeLog    2005-05-18 08:58:03 UTC (rev 44666)
@@ -1,3 +1,8 @@
+2005-05-18  Martin Baulig  <[EMAIL PROTECTED]>
+
+       * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
+       a loop and may leave it, reset the barrier; fixes #74974.
+
 2005-05-16  Raja R Harinath  <[EMAIL PROTECTED]>
 
        Fix test-382.cs.  Emit values of decimal constants.

Modified: trunk/mcs/gmcs/flowanalysis.cs
===================================================================
--- trunk/mcs/gmcs/flowanalysis.cs      2005-05-18 07:01:26 UTC (rev 44665)
+++ trunk/mcs/gmcs/flowanalysis.cs      2005-05-18 08:58:03 UTC (rev 44666)
@@ -647,19 +647,22 @@
                                                        // then we do always 
return (or stay in the
                                                        // loop forever).
                                                        new_r.SetReturns ();
-                       }
+                                               }
 
                                                new_r.SetBarrier ();
                                        } else {
                                                if (new_r.Returns == 
FlowReturns.Always) {
                                                        // We're either finite 
or we may leave the loop.
                                                        
new_r.SetReturnsSometimes ();
-                       }
+                                               }
                                                if (new_r.Throws == 
FlowReturns.Always) {
                                                        // We're either finite 
or we may leave the loop.
                                                        
new_r.SetThrowsSometimes ();
                                                }
-                       }
+                                       }
+
+                                       if (may_leave_loop)
+                                               new_r.ResetBarrier ();
                                } else if (branching.Type == 
BranchingType.Switch) {
                                        if (new_r.MayBreak || new_r.MayReturn)
                                                new_r.ResetBarrier ();

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to