Test for the type being different in parameter_lists_match.
authorEric Anholt <eric@anholt.net>
Fri, 2 Apr 2010 05:00:29 +0000 (19:00 -1000)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 2 Apr 2010 18:22:41 +0000 (11:22 -0700)
Fixes CorrectFuncOverload.frag.

ast_to_hir.cpp

index 456271d3002c9c304239e9bb9273a8431c55d6cc..8ed56d5800b1d130291e4b0352b34675671914cf 100644 (file)
@@ -1644,6 +1644,9 @@ parameter_lists_match(exec_list *list_a, exec_list *list_b)
    exec_list_iterator iter_b = list_b->iterator();
 
    while (iter_a.has_next()) {
+      ir_variable *a = (ir_variable *)iter_a.get();
+      ir_variable *b = (ir_variable *)iter_b.get();
+
       /* If all of the parameters from the other parameter list have been
        * exhausted, the lists have different length and, by definition,
        * do not match.
@@ -1654,8 +1657,8 @@ parameter_lists_match(exec_list *list_a, exec_list *list_b)
       /* If the types of the parameters do not match, the parameters lists
        * are different.
        */
-      /* FINISHME */
-
+      if (a->type != b->type)
+        return false;
 
       iter_a.next();
       iter_b.next();