This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Fix for autopar
- From: "Sebastian Pop" <sebpop at gmail dot com>
- To: "Zdenek Dvorak" <rakdver at kam dot mff dot cuni dot cz>, "GCC Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 8 Jan 2008 18:14:25 -0600
- Subject: Re: [RFC] Fix for autopar
- References: <cb9d34b20801081402q78207552o5410da09c28723d0@mail.gmail.com>
Hi,
Another bug with f951 is that built_in_decls[BUILT_IN_OMP_GET_NUM_THREADS]
is NULL, that produces an ICE in omp-low.c that tries to use it:
t = build_call_expr (built_in_decls[BUILT_IN_OMP_GET_NUM_THREADS], 0);
For fortran, the omp builtins are initialized conditionally. The
attached patch initializes these builtins also for autopar.
The patch is not yet tested except on the testcases that I got from
spec2006 that now pass. I'm just asking for comments.
--
Sebastian
AMD - GNU Tools
* f95-lang.c (gfc_init_builtin_functions): Initialize openMP builtins
when compiling with -ftree-parallelize-loops.
Index: f95-lang.c
===================================================================
--- f95-lang.c (revision 131401)
+++ f95-lang.c (working copy)
@@ -1137,7 +1137,7 @@
#include "../sync-builtins.def"
#undef DEF_SYNC_BUILTIN
- if (gfc_option.flag_openmp)
+ if (gfc_option.flag_openmp || flag_tree_parallelize_loops)
{
#undef DEF_GOMP_BUILTIN
#define DEF_GOMP_BUILTIN(code, name, type, attr) \