gfc_conv_elemental_dependency had some ad-hoc fixes to replace one array by its temporary in the scalarizer. It was using a fake gfc_loopinfo struct so that gfc_trans_create_temp_array doesn't overwrite the real one. It was using fake array references and custom delta calculation, so that scalarizer's partial offset calculation used the right array index while accessing the temporary even if it believed it was accessing the regular array. Patch 56 removes those fixes, replaces the array gfc_ss struct with a new one for the temporary and calls gfc_set_delta to update arrays' delta after calling gfc_trans_create_temp_array. Patch 55 is a preliminary patch making some functions public. OK?