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]

[PATCH] Fix gomp/30143, OpenMP can produce invalid gimple


Hi,
  OpenMP lowering can cause invalid gimple to be produced.  This was
originally caught by my invalid gimple catcher but I was able to create
a testcase that failed on the mainline with some complex typed variable.
The problem here is that openmp lowering does not do the same lowering
as the nesting pass does for one case.  This one case is transforming
assignments from a gimple variable to a store to a component of a
struct.

The way to fix this is to copy code from the unnesting pass and use it
in the openmp lowering pass.

OK? Bootstrapped and tested on i686-linux-gnu with no regressions.

If someone wants a 4.2 version of this patch, I can post one as my
testcase ICEs there also.

Thanks,
Andrew Pinski

ChangeLog:

	* omp-low.c (init_tmp_var): New function.	
	(save_tmp_var): New function.
	(lower_omp_1): Use them for VAR_DECL.

	* gcc.dg/gomp/complex-1.c: New testcase.

	


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