https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118627
--- Comment #5 from Kaaden Ruman <kaadenruman at hotmail dot com> --- (In reply to Tobias Burnus from comment #3) > Crossref: That code was added in commit > r14-6515-g5fdb150cd4bf8f > OpenMP/OpenACC: Rework clause expansion and nested struct handling > > The called function > static bool > omp_parse_access_method (tree *expr0, enum access_method_kinds *kind) > > duly sets 'kind' based on 'expr0', which might get modified. And then > unconditionally returns 'true'. -> Could be set 'void' (there is a single > caller, the one of comment 0). - And some more cleanup could be done. > > For instance, omp_parse_expr also returns true unconditionally, > called in an if clause in 'omp_parse_expr'. > > I checked some pending OpenMP patches but those do not modify/extend those > functions, either. Is the "Tobias Burnus' suggestion" patch what you had in mind? All the parsers in this file return bool and return true on success. There are others that always succeed: omp_parse_structure_base and consequently omp_parse_array_expr and omp_parse_expr. Should those be changed as well? Maybe that is annoying to have to think about though when coding though. What do you think about just propagating the fail up, i.e. blindly handling the case that omp_parse_access_method does return false. I will attach a patch for it as well.