This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[C++ PATCH] Add CLEANUP_POINT_EXPRs around OMP_PARALLEL/TASK/FOR if needed (PR c++/51669)


Hi!

The f1 function in the testcase fails newly starting with
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181332 because there
is no CLEANUP_POINT_EXPR around OMP_PARALLEL/OMP_TASK/OMP_FOR whose
IF/FINAL/NUM_THREADS/SCHEDULE clause expression might need some cleanups.
But as the testcase shows, it isn't hard to write a testcase where
even 4.6 or 4.2 ICEs too.  It isn't clear where to put the
CLEANUP_POINT_EXPR though, OpenMP 3.1 says just (e.g. for parallel):
"The if clause expression and the num_threads clause expression are
evaluated in the context outside of the parallel construct, and no ordering
of those evaluations is specified. It is also unspecified whether, in what order, or
how many times any side-effects of the evaluation of the num_threads or if clause
expressions occur."

Attached are two different patches, the first one puts the
CLEANUP_POINT_EXPR around the whole OMP_PARALLEL etc. stmt, the second
one wraps the individual clause expressions into CLEANUP_POINT_EXPR.

Both patches have been bootstrapped/regtested on x86_64-linux and
i686-linux, which one is preferrable?

	Jakub

Attachment: X404
Description: Text document

Attachment: X404a
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]