aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2021-09-21 14:32:26 -0700
committerIan Lance Taylor <iant@golang.org>2021-09-21 14:32:26 -0700
commita5b5cabc91c38710adbe5c8a2b53882abe994441 (patch)
tree66b099a6ebc2076ef353afa90d9703824d023812 /gcc/fortran
parenta0791d0ed4f147ef347e83f4aedc7ad03f1a2008 (diff)
parent09e18d113b3c3dae896ac1a8ad1e0087adbb153b (diff)
downloadgcc-a5b5cabc91c38710adbe5c8a2b53882abe994441.zip
gcc-a5b5cabc91c38710adbe5c8a2b53882abe994441.tar.gz
gcc-a5b5cabc91c38710adbe5c8a2b53882abe994441.tar.bz2
Merge from trunk revision 09e18d113b3c3dae896ac1a8ad1e0087adbb153b.
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog28
-rw-r--r--gcc/fortran/cpp.c106
-rw-r--r--gcc/fortran/cpp.h2
-rw-r--r--gcc/fortran/dump-parse-tree.c7
-rw-r--r--gcc/fortran/gfortran.h6
-rw-r--r--gcc/fortran/openmp.c25
-rw-r--r--gcc/fortran/options.c24
-rw-r--r--gcc/fortran/scanner.c82
-rw-r--r--gcc/fortran/scanner.h2
-rw-r--r--gcc/fortran/trans-decl.c5
-rw-r--r--gcc/fortran/trans-openmp.c7
11 files changed, 210 insertions, 84 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 8e22dd2..08e7d4c 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,31 @@
+2021-09-20 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.h (gfc_omp_clauses): Add order_unconstrained.
+ * dump-parse-tree.c (show_omp_clauses): Dump it.
+ * openmp.c (gfc_match_omp_clauses): Match unconstrained/reproducible
+ modifiers to ordered(concurrent).
+ (OMP_DISTRIBUTE_CLAUSES): Accept ordered clause.
+ (resolve_omp_clauses): Reject ordered + order on same directive.
+ * trans-openmp.c (gfc_trans_omp_clauses, gfc_split_omp_clauses): Pass
+ on unconstrained modifier of ordered(concurrent).
+
+2021-09-17 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/102366
+ * trans-decl.c (gfc_finish_var_decl): Disable the warning message
+ for variables moved from stack to static storange if they are
+ declared in the main, but allow the move to happen.
+
+2021-09-17 Sandra Loosemore <sandra@codesourcery.com>
+
+ * intrinsic.texi (ISO_C_BINDING): Change C_FLOAT128 to correspond
+ to _Float128 rather than __float128.
+ * iso-c-binding.def (c_float128): Update comments.
+ * trans-intrinsic.c (gfc_builtin_decl_for_float_kind): Likewise.
+ (build_round_expr): Likewise.
+ (gfc_build_intrinsic_lib_fndcecls): Likewise.
+ * trans-types.h (gfc_real16_is_float128): Likewise.
+
2021-09-16 Harald Anlauf <anlauf@gmx.de>
PR fortran/102287
diff --git a/gcc/fortran/cpp.c b/gcc/fortran/cpp.c
index 83c4517..3ff8954 100644
--- a/gcc/fortran/cpp.c
+++ b/gcc/fortran/cpp.c
@@ -19,11 +19,15 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
+
+#define GCC_C_COMMON_C
+#include "options.h" /* For cpp_reason_option_codes. */
+#undef GCC_C_COMMON_C
+
#include "target.h"
#include "gfortran.h"
#include "diagnostic.h"
-
#include "toplev.h"
#include "../../libcpp/internal.h"
@@ -240,6 +244,18 @@ gfc_cpp_temporary_file (void)
return gfc_cpp_option.temporary_filename;
}
+static void
+gfc_cpp_register_include_paths (void)
+{
+ int cxx_stdinc = 0;
+ cpp_get_options (cpp_in)->warn_missing_include_dirs
+ = global_options.x_cpp_warn_missing_include_dirs;
+ register_include_chains (cpp_in, gfc_cpp_option.sysroot,
+ gfc_cpp_option.prefix, gfc_cpp_option.multilib,
+ gfc_cpp_option.standard_include_paths, cxx_stdinc,
+ gfc_cpp_option.verbose);
+}
+
void
gfc_cpp_init_options (unsigned int decoded_options_count,
struct cl_decoded_option *decoded_options ATTRIBUTE_UNUSED)
@@ -435,6 +451,37 @@ gfc_cpp_handle_option (size_t scode, const char *arg, int value ATTRIBUTE_UNUSED
return result;
}
+/* This function needs to be called before gfc_cpp_register_include_paths
+ as the latter may diagnose missing include directories. */
+static void
+gfc_cpp_init_cb (void)
+{
+ struct cpp_callbacks *cb;
+
+ cb = cpp_get_callbacks (cpp_in);
+ cb->file_change = cb_file_change;
+ cb->line_change = cb_line_change;
+ cb->ident = cb_ident;
+ cb->def_pragma = cb_def_pragma;
+ cb->diagnostic = cb_cpp_diagnostic;
+
+ if (gfc_cpp_option.dump_includes)
+ cb->include = cb_include;
+
+ if ((gfc_cpp_option.dump_macros == 'D')
+ || (gfc_cpp_option.dump_macros == 'N'))
+ {
+ cb->define = cb_define;
+ cb->undef = cb_undef;
+ }
+
+ if (gfc_cpp_option.dump_macros == 'U')
+ {
+ cb->before_define = dump_queued_macros;
+ cb->used_define = cb_used_define;
+ cb->used_undef = cb_used_undef;
+ }
+}
void
gfc_cpp_post_options (void)
@@ -498,6 +545,7 @@ gfc_cpp_post_options (void)
way libcpp will do it, namely, with no charset conversion but with
skipping of a UTF-8 BOM if present. */
diagnostic_initialize_input_context (global_dc, nullptr, true);
+ gfc_cpp_init_cb ();
gfc_cpp_register_include_paths ();
}
@@ -506,32 +554,6 @@ gfc_cpp_post_options (void)
void
gfc_cpp_init_0 (void)
{
- struct cpp_callbacks *cb;
-
- cb = cpp_get_callbacks (cpp_in);
- cb->file_change = cb_file_change;
- cb->line_change = cb_line_change;
- cb->ident = cb_ident;
- cb->def_pragma = cb_def_pragma;
- cb->diagnostic = cb_cpp_diagnostic;
-
- if (gfc_cpp_option.dump_includes)
- cb->include = cb_include;
-
- if ((gfc_cpp_option.dump_macros == 'D')
- || (gfc_cpp_option.dump_macros == 'N'))
- {
- cb->define = cb_define;
- cb->undef = cb_undef;
- }
-
- if (gfc_cpp_option.dump_macros == 'U')
- {
- cb->before_define = dump_queued_macros;
- cb->used_define = cb_used_define;
- cb->used_undef = cb_used_undef;
- }
-
/* Initialize the print structure. Setting print.src_line to -1 here is
a trick to guarantee that the first token of the file will cause
a linemarker to be output by maybe_print_line. */
@@ -723,17 +745,6 @@ gfc_cpp_add_include_path_after (char *path, bool user_supplied)
add_path (path, INC_AFTER, cxx_aware, user_supplied);
}
-void
-gfc_cpp_register_include_paths (void)
-{
- int cxx_stdinc = 0;
- register_include_chains (cpp_in, gfc_cpp_option.sysroot,
- gfc_cpp_option.prefix, gfc_cpp_option.multilib,
- gfc_cpp_option.standard_include_paths, cxx_stdinc,
- gfc_cpp_option.verbose);
-}
-
-
static void scan_translation_unit_trad (cpp_reader *);
static void account_for_newlines (const unsigned char *, size_t);
@@ -1043,6 +1054,21 @@ cb_used_define (cpp_reader *pfile, location_t line ATTRIBUTE_UNUSED,
cpp_define_queue = q;
}
+/* Return the gcc option code associated with the reason for a cpp
+ message, or 0 if none. */
+
+static int
+cb_cpp_diagnostic_cpp_option (enum cpp_warning_reason reason)
+{
+ const struct cpp_reason_option_codes_t *entry;
+
+ for (entry = cpp_reason_option_codes; entry->reason != CPP_W_NONE; entry++)
+ if (entry->reason == reason)
+ return entry->option_code;
+ return 0;
+}
+
+
/* Callback from cpp_error for PFILE to print diagnostics from the
preprocessor. The diagnostic is of type LEVEL, with REASON set
to the reason code if LEVEL is represents a warning, at location
@@ -1089,8 +1115,8 @@ cb_cpp_diagnostic (cpp_reader *pfile ATTRIBUTE_UNUSED,
}
diagnostic_set_info_translated (&diagnostic, msg, ap,
richloc, dlevel);
- if (reason == CPP_W_WARNING_DIRECTIVE)
- diagnostic_override_option_index (&diagnostic, OPT_Wcpp);
+ diagnostic_override_option_index (&diagnostic,
+ cb_cpp_diagnostic_cpp_option (reason));
ret = diagnostic_report_diagnostic (global_dc, &diagnostic);
if (level == CPP_DL_WARNING_SYSHDR)
global_dc->dc_warn_system_headers = save_warn_system_headers;
diff --git a/gcc/fortran/cpp.h b/gcc/fortran/cpp.h
index f642c77..5cb7e5a 100644
--- a/gcc/fortran/cpp.h
+++ b/gcc/fortran/cpp.h
@@ -50,6 +50,4 @@ void gfc_cpp_done (void);
void gfc_cpp_add_include_path (char *path, bool user_supplied);
void gfc_cpp_add_include_path_after (char *path, bool user_supplied);
-void gfc_cpp_register_include_paths (void);
-
#endif /* GFC_CPP_H */
diff --git a/gcc/fortran/dump-parse-tree.c b/gcc/fortran/dump-parse-tree.c
index a1df47c..28eb09e 100644
--- a/gcc/fortran/dump-parse-tree.c
+++ b/gcc/fortran/dump-parse-tree.c
@@ -1630,7 +1630,12 @@ show_omp_clauses (gfc_omp_clauses *omp_clauses)
if (omp_clauses->independent)
fputs (" INDEPENDENT", dumpfile);
if (omp_clauses->order_concurrent)
- fputs (" ORDER(CONCURRENT)", dumpfile);
+ {
+ fputs (" ORDER(", dumpfile);
+ if (omp_clauses->order_unconstrained)
+ fputs ("UNCONSTRAINED:", dumpfile);
+ fputs ("CONCURRENT)", dumpfile);
+ }
if (omp_clauses->ordered)
{
if (omp_clauses->orderedc)
diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h
index fdf556e..3c7a843 100644
--- a/gcc/fortran/gfortran.h
+++ b/gcc/fortran/gfortran.h
@@ -1491,7 +1491,8 @@ typedef struct gfc_omp_clauses
unsigned inbranch:1, notinbranch:1, nogroup:1;
unsigned sched_simd:1, sched_monotonic:1, sched_nonmonotonic:1;
unsigned simd:1, threads:1, depend_source:1, destroy:1, order_concurrent:1;
- unsigned capture:1, grainsize_strict:1, num_tasks_strict:1;
+ unsigned order_unconstrained:1, capture:1, grainsize_strict:1;
+ unsigned num_tasks_strict:1;
ENUM_BITFIELD (gfc_omp_sched_kind) sched_kind:3;
ENUM_BITFIELD (gfc_omp_device_type) device_type:2;
ENUM_BITFIELD (gfc_omp_memorder) memorder:3;
@@ -3028,9 +3029,10 @@ match gfc_get_pdt_instance (gfc_actual_arglist *, gfc_symbol **,
void gfc_scanner_done_1 (void);
void gfc_scanner_init_1 (void);
-void gfc_add_include_path (const char *, bool, bool, bool);
+void gfc_add_include_path (const char *, bool, bool, bool, bool);
void gfc_add_intrinsic_modules_path (const char *);
void gfc_release_include_path (void);
+void gfc_check_include_dirs (void);
FILE *gfc_open_included_file (const char *, bool, bool);
int gfc_at_end (void);
diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c
index a64b7f5..9ee52d6 100644
--- a/gcc/fortran/openmp.c
+++ b/gcc/fortran/openmp.c
@@ -2369,9 +2369,23 @@ gfc_match_omp_clauses (gfc_omp_clauses **cp, const omp_mask mask,
break;
case 'o':
if ((mask & OMP_CLAUSE_ORDER)
- && !c->order_concurrent
- && gfc_match ("order ( concurrent )") == MATCH_YES)
+ && (m = gfc_match_dupl_check (!c->order_concurrent, "order ("))
+ != MATCH_NO)
{
+ if (m == MATCH_ERROR)
+ goto error;
+ if (gfc_match (" reproducible : concurrent )") == MATCH_YES
+ || gfc_match (" concurrent )") == MATCH_YES)
+ ;
+ else if (gfc_match (" unconstrained : concurrent )") == MATCH_YES)
+ c->order_unconstrained = true;
+ else
+ {
+ gfc_error ("Expected ORDER(CONCURRENT) at %C "
+ "with optional %<reproducible%> or "
+ "%<unconstrained%> modifier");
+ goto error;
+ }
c->order_concurrent = true;
continue;
}
@@ -3475,7 +3489,8 @@ cleanup:
| OMP_CLAUSE_SHARED | OMP_CLAUSE_REDUCTION)
#define OMP_DISTRIBUTE_CLAUSES \
(omp_mask (OMP_CLAUSE_PRIVATE) | OMP_CLAUSE_FIRSTPRIVATE \
- | OMP_CLAUSE_LASTPRIVATE | OMP_CLAUSE_COLLAPSE | OMP_CLAUSE_DIST_SCHEDULE)
+ | OMP_CLAUSE_LASTPRIVATE | OMP_CLAUSE_COLLAPSE | OMP_CLAUSE_DIST_SCHEDULE \
+ | OMP_CLAUSE_ORDER)
#define OMP_SINGLE_CLAUSES \
(omp_mask (OMP_CLAUSE_PRIVATE) | OMP_CLAUSE_FIRSTPRIVATE)
#define OMP_ORDERED_CLAUSES \
@@ -5643,7 +5658,9 @@ resolve_omp_clauses (gfc_code *code, gfc_omp_clauses *omp_clauses,
if (omp_clauses->orderedc && omp_clauses->orderedc < omp_clauses->collapse)
gfc_error ("ORDERED clause parameter is less than COLLAPSE at %L",
&code->loc);
-
+ if (omp_clauses->order_concurrent && omp_clauses->ordered)
+ gfc_error ("ORDER clause must not be used together ORDERED at %L",
+ &code->loc);
if (omp_clauses->if_expr)
{
gfc_expr *expr = omp_clauses->if_expr;
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
index 847e20e..d789397 100644
--- a/gcc/fortran/options.c
+++ b/gcc/fortran/options.c
@@ -159,14 +159,7 @@ gfc_init_options (unsigned int decoded_options_count,
| GFC_FPE_UNDERFLOW;
gfc_option.rtcheck = 0;
- /* ??? Wmissing-include-dirs is disabled by default in C/C++ but
- enabled by default in Fortran. Ideally, we should express this
- in .opt, but that is not supported yet. */
- SET_OPTION_IF_UNSET (&global_options, &global_options_set,
- cpp_warn_missing_include_dirs, 1);
-
set_dec_flags (0);
-
set_default_std_flags ();
/* Initialize cpp-related options. */
@@ -260,6 +253,13 @@ gfc_post_options (const char **pfilename)
char *source_path;
int i;
+ /* This needs to be after the commandline has been processed.
+ In Fortran, the options is by default enabled, in C/C++
+ by default disabled. */
+ SET_OPTION_IF_UNSET (&global_options, &global_options_set,
+ cpp_warn_missing_include_dirs, 1);
+ gfc_check_include_dirs ();
+
/* Finalize DEC flags. */
post_dec_flags (flag_dec);
@@ -339,10 +339,10 @@ gfc_post_options (const char **pfilename)
source_path = (char *) alloca (i + 1);
memcpy (source_path, canon_source_file, i);
source_path[i] = 0;
- gfc_add_include_path (source_path, true, true, true);
+ gfc_add_include_path (source_path, true, true, true, false);
}
else
- gfc_add_include_path (".", true, true, true);
+ gfc_add_include_path (".", true, true, true, false);
if (canon_source_file != gfc_source_file)
free (CONST_CAST (char *, canon_source_file));
@@ -511,7 +511,7 @@ gfc_handle_module_path_options (const char *arg)
gfc_option.module_dir = XCNEWVEC (char, strlen (arg) + 2);
strcpy (gfc_option.module_dir, arg);
- gfc_add_include_path (gfc_option.module_dir, true, false, true);
+ gfc_add_include_path (gfc_option.module_dir, true, false, true, true);
strcat (gfc_option.module_dir, "/");
}
@@ -690,7 +690,7 @@ gfc_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value,
with intrinsic modules. Do no warn because during testing
without an installed compiler, we would get lots of bogus
warnings for a missing include directory. */
- gfc_add_include_path (arg, false, false, false);
+ gfc_add_include_path (arg, false, false, false, true);
gfc_add_intrinsic_modules_path (arg);
break;
@@ -737,7 +737,7 @@ gfc_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value,
break;
case OPT_I:
- gfc_add_include_path (arg, true, false, true);
+ gfc_add_include_path (arg, true, false, true, true);
break;
case OPT_J:
diff --git a/gcc/fortran/scanner.c b/gcc/fortran/scanner.c
index 39db099..6fe74bd 100644
--- a/gcc/fortran/scanner.c
+++ b/gcc/fortran/scanner.c
@@ -298,17 +298,69 @@ gfc_scanner_done_1 (void)
}
}
+static bool
+gfc_do_check_include_dir (const char *path, bool warn)
+{
+ struct stat st;
+ if (stat (path, &st))
+ {
+ if (errno != ENOENT)
+ gfc_warning_now (0, "Include directory %qs: %s",
+ path, xstrerror(errno));
+ else if (warn && !gfc_cpp_enabled ())
+ gfc_warning_now (OPT_Wmissing_include_dirs,
+ "Nonexistent include directory %qs", path);
+ return false;
+ }
+ else if (!S_ISDIR (st.st_mode))
+ {
+ gfc_fatal_error ("%qs is not a directory", path);
+ return false;
+ }
+ return true;
+}
+
+/* In order that -W(no-)missing-include-dirs works, the diagnostic can only be
+ run after processing the commandline. */
+static void
+gfc_do_check_include_dirs (gfc_directorylist **list)
+{
+ gfc_directorylist *prev, *q, *n;
+ prev = NULL;
+ n = *list;
+ while (n)
+ {
+ q = n; n = n->next;
+ if (gfc_do_check_include_dir (q->path, q->warn))
+ {
+ prev = q;
+ continue;
+ }
+ if (prev == NULL)
+ *list = n;
+ else
+ prev->next = n;
+ free (q->path);
+ free (q);
+ }
+}
+
+void
+gfc_check_include_dirs ()
+{
+ gfc_do_check_include_dirs (&include_dirs);
+ gfc_do_check_include_dirs (&intrinsic_modules_dirs);
+}
/* Adds path to the list pointed to by list. */
static void
add_path_to_list (gfc_directorylist **list, const char *path,
- bool use_for_modules, bool head, bool warn)
+ bool use_for_modules, bool head, bool warn, bool defer_warn)
{
gfc_directorylist *dir;
const char *p;
char *q;
- struct stat st;
size_t len;
int i;
@@ -326,21 +378,8 @@ add_path_to_list (gfc_directorylist **list, const char *path,
while (i >=0 && IS_DIR_SEPARATOR (q[i]))
q[i--] = '\0';
- if (stat (q, &st))
- {
- if (errno != ENOENT)
- gfc_warning_now (0, "Include directory %qs: %s", path,
- xstrerror(errno));
- else if (warn)
- gfc_warning_now (OPT_Wmissing_include_dirs,
- "Nonexistent include directory %qs", path);
- return;
- }
- else if (!S_ISDIR (st.st_mode))
- {
- gfc_fatal_error ("%qs is not a directory", path);
- return;
- }
+ if (!defer_warn && !gfc_do_check_include_dir (q, warn))
+ return;
if (head || *list == NULL)
{
@@ -362,17 +401,20 @@ add_path_to_list (gfc_directorylist **list, const char *path,
if (head)
*list = dir;
dir->use_for_modules = use_for_modules;
+ dir->warn = warn;
dir->path = XCNEWVEC (char, strlen (p) + 2);
strcpy (dir->path, p);
strcat (dir->path, "/"); /* make '/' last character */
}
+/* defer_warn is set to true while parsing the commandline. */
void
gfc_add_include_path (const char *path, bool use_for_modules, bool file_dir,
- bool warn)
+ bool warn, bool defer_warn)
{
- add_path_to_list (&include_dirs, path, use_for_modules, file_dir, warn);
+ add_path_to_list (&include_dirs, path, use_for_modules, file_dir, warn,
+ defer_warn);
/* For '#include "..."' these directories are automatically searched. */
if (!file_dir)
@@ -383,7 +425,7 @@ gfc_add_include_path (const char *path, bool use_for_modules, bool file_dir,
void
gfc_add_intrinsic_modules_path (const char *path)
{
- add_path_to_list (&intrinsic_modules_dirs, path, true, false, false);
+ add_path_to_list (&intrinsic_modules_dirs, path, true, false, false, false);
}
diff --git a/gcc/fortran/scanner.h b/gcc/fortran/scanner.h
index 0bad63f..8782fe6 100644
--- a/gcc/fortran/scanner.h
+++ b/gcc/fortran/scanner.h
@@ -23,8 +23,8 @@ along with GCC; see the file COPYING3. If not see
typedef struct gfc_directorylist
{
char *path;
- bool use_for_modules;
struct gfc_directorylist *next;
+ bool use_for_modules, warn;
}
gfc_directorylist;
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
index bed61e2..3bd8a0f 100644
--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -743,7 +743,6 @@ gfc_finish_var_decl (tree decl, gfc_symbol * sym)
/* Keep variables larger than max-stack-var-size off stack. */
if (!(sym->ns->proc_name && sym->ns->proc_name->attr.recursive)
- && !(sym->ns->proc_name && sym->ns->proc_name->attr.is_main_program)
&& !sym->attr.automatic
&& sym->attr.save != SAVE_EXPLICIT
&& sym->attr.save != SAVE_IMPLICIT
@@ -757,7 +756,9 @@ gfc_finish_var_decl (tree decl, gfc_symbol * sym)
|| sym->attr.allocatable)
&& !DECL_ARTIFICIAL (decl))
{
- if (flag_max_stack_var_size > 0)
+ if (flag_max_stack_var_size > 0
+ && !(sym->ns->proc_name
+ && sym->ns->proc_name->attr.is_main_program))
gfc_warning (OPT_Wsurprising,
"Array %qs at %L is larger than limit set by "
"%<-fmax-stack-var-size=%>, moved from stack to static "
diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-openmp.c
index e55e0c8..4ca2c3f 100644
--- a/gcc/fortran/trans-openmp.c
+++ b/gcc/fortran/trans-openmp.c
@@ -3803,6 +3803,7 @@ gfc_trans_omp_clauses (stmtblock_t *block, gfc_omp_clauses *clauses,
if (clauses->order_concurrent)
{
c = build_omp_clause (gfc_get_location (&where), OMP_CLAUSE_ORDER);
+ OMP_CLAUSE_ORDER_UNCONSTRAINED (c) = clauses->order_unconstrained;
omp_clauses = gfc_trans_add_clause (c, omp_clauses);
}
@@ -5892,6 +5893,8 @@ gfc_split_omp_clauses (gfc_code *code,
= code->ext.omp_clauses->collapse;
clausesa[GFC_OMP_SPLIT_DISTRIBUTE].order_concurrent
= code->ext.omp_clauses->order_concurrent;
+ clausesa[GFC_OMP_SPLIT_DISTRIBUTE].order_unconstrained
+ = code->ext.omp_clauses->order_unconstrained;
}
if (mask & GFC_OMP_MASK_PARALLEL)
{
@@ -5946,6 +5949,8 @@ gfc_split_omp_clauses (gfc_code *code,
= code->ext.omp_clauses->collapse;
clausesa[GFC_OMP_SPLIT_DO].order_concurrent
= code->ext.omp_clauses->order_concurrent;
+ clausesa[GFC_OMP_SPLIT_DO].order_unconstrained
+ = code->ext.omp_clauses->order_unconstrained;
}
if (mask & GFC_OMP_MASK_SIMD)
{
@@ -5962,6 +5967,8 @@ gfc_split_omp_clauses (gfc_code *code,
= code->ext.omp_clauses->if_exprs[OMP_IF_SIMD];
clausesa[GFC_OMP_SPLIT_SIMD].order_concurrent
= code->ext.omp_clauses->order_concurrent;
+ clausesa[GFC_OMP_SPLIT_SIMD].order_unconstrained
+ = code->ext.omp_clauses->order_unconstrained;
/* And this is copied to all. */
clausesa[GFC_OMP_SPLIT_SIMD].if_expr
= code->ext.omp_clauses->if_expr;