aboutsummaryrefslogtreecommitdiff
path: root/gcc/opts.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/opts.cc')
-rw-r--r--gcc/opts.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/opts.cc b/gcc/opts.cc
index 3fbfca98d7a..019ec971596 100644
--- a/gcc/opts.cc
+++ b/gcc/opts.cc
@@ -1393,6 +1393,14 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
}
+ if (opts_set->x_flag_openmp_target)
+ {
+ if (opts->x_flag_openacc)
+ error ("%<-fopenacc%> not compatible with %<-fopenmp-target=%>");
+ if (!opts->x_flag_openmp)
+ error ("%<-fopenmp-target=%> requires %<-fopenmp%> setting");
+ }
+
diagnose_options (opts, opts_set, loc);
}