OSDN Git Service

PR c++/48930
[pf3gnuchains/gcc-fork.git] / gcc / ira-conflicts.c
index 04d881e..be00283 100644 (file)
@@ -213,19 +213,22 @@ allocnos_conflict_for_copy_p (ira_allocno_t a1, ira_allocno_t a2)
 static bool
 commutative_constraint_p (const char *str)
 {
+  int curr_alt, c;
   bool ignore_p;
-  int c;
 
-  for (ignore_p = false;;)
+  for (ignore_p = false, curr_alt = 0;;)
     {
       c = *str;
       if (c == '\0')
        break;
       str += CONSTRAINT_LEN (c, str);
-      if (c == '#')
+      if (c == '#' || !recog_data.alternative_enabled_p[curr_alt])
        ignore_p = true;
       else if (c == ',')
-       ignore_p = false;
+       {
+         curr_alt++;
+         ignore_p = false;
+       }
       else if (! ignore_p)
        {
          /* Usually `%' is the first constraint character but the
@@ -270,7 +273,7 @@ get_dup_num (int op_num, bool use_commut_op_p)
       c = *str;
       if (c == '\0')
        break;
-      if (c == '#')
+      if (c == '#' || !recog_data.alternative_enabled_p[curr_alt])
        ignore_p = true;
       else if (c == ',')
        {
@@ -612,7 +615,7 @@ build_object_conflicts (ira_object_t obj)
   ira_allocno_t a = OBJECT_ALLOCNO (obj);
   IRA_INT_TYPE *object_conflicts;
   minmax_set_iterator asi;
-  int parent_min, parent_max;
+  int parent_min, parent_max ATTRIBUTE_UNUSED;
 
   object_conflicts = conflicts[OBJECT_CONFLICT_ID (obj)];
   px = 0;