------- Comment #11 from janus at gcc dot gnu dot org 2009-09-10 18:04 ------- (In reply to comment #9) > > - resolve_code (code, ns); > > return true; > > I had wondered about the function of that resolve_code. If it can be safely > removed, do it.
Unfortunately, removing it causes ICEs on typebound_operator_3 and ..._4. Will try to see if they can be eliminated. > Otherwise another variant of my experiment in comment #3 is to > remove the codelet; > > + if (gfc_is_proc_ptr_comp (e, &comp) > + && (resolve_expr_ppc (e) == SUCCESS)) > + return SUCCESS; > > Into resolve_function, just before the offending error. That's a possibility, but it feels a bit like fixing the effects and not the cause. > All that said, I would like to understand why it is that the number of errors > that you get is equal to the number of interface assignments before the ppc > evaluation. That is: > > prc_id = "foobar" > prc_id = "foobar" > prc_id = "foobar" > prc_id = "foobar" > n_in = prc_lib% get_n_in (2) > > produces the error 4 times! This seems to be because the 'resolve_code' call above resolves not only the assignment statement itself, but everything that comes after it. So in this case the PPC call is resolved four extra times! -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41242