+2019-02-23 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR driver/69471
+ * opts-common.c (prune_options): Also prune joined switches
+ with Negative and RejectNegative.
+ * config/i386/i386.opt (march=): Add Negative(march=).
+ (mtune=): Add Negative(mtune=).
+ * doc/options.texi: Document Negative used together with Joined
+ and RejectNegative.
+
2019-02-22 Martin Sebor <msebor@redhat.com>
* doc/extend.texi (Other Builtins): Add
Enum(ix86_align_data) String(cacheline) Value(ix86_align_data_type_cacheline)
march=
-Target RejectNegative Joined Var(ix86_arch_string)
+Target RejectNegative Negative(march=) Joined Var(ix86_arch_string)
Generate code for given CPU.
masm=
Use direct references against %gs when accessing tls data.
mtune=
-Target RejectNegative Joined Var(ix86_tune_string)
+Target RejectNegative Negative(mtune=) Joined Var(ix86_tune_string)
Schedule code for given CPU.
mtune-ctrl=
The option will turn off another option @var{othername}, which is
the option name with the leading ``-'' removed. This chain action will
propagate through the @code{Negative} property of the option to be
-turned off.
+turned off. The driver will prune options, removing those that are
+turned off by some later option. This pruning is not done for options
+with @code{Joined} or @code{JoinedOrMissing} properties, unless the
+options have either @code{RejectNegative} property or the @code{Negative}
+property mentions an option other than itself.
As a consequence, if you have a group of mutually-exclusive
options, their @code{Negative} properties should form a circular chain.
goto keep;
/* Skip joined switches. */
- if ((option->flags & CL_JOINED))
+ if ((option->flags & CL_JOINED)
+ && (!option->cl_reject_negative
+ || (unsigned int) option->neg_index != opt_idx))
goto keep;
for (j = i + 1; j < old_decoded_options_count; j++)
continue;
if (cl_options[next_opt_idx].neg_index < 0)
continue;
- if ((cl_options[next_opt_idx].flags & CL_JOINED))
- continue;
+ if ((cl_options[next_opt_idx].flags & CL_JOINED)
+ && (!cl_options[next_opt_idx].cl_reject_negative
+ || ((unsigned int) cl_options[next_opt_idx].neg_index
+ != next_opt_idx)))
+ continue;
if (cancel_option (opt_idx, next_opt_idx, next_opt_idx))
break;
}
+2019-02-23 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR driver/69471
+ * gcc.dg/pr69471-1.c: New test.
+ * gcc.dg/pr69471-2.c: Likewise.
+ * gcc.target/i386/pr69471-3.c: Likewise.
+
2019-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/84387
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-Wno-implicit-function-declaration -Wno-int-conversion -fno-builtin-free -fno-builtin-malloc" } */
+
+void *
+foo (void * p)
+{
+ free (p);
+ return malloc (p);
+}
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-gstabs2 -gdwarf-4 -gstabs3" } */
+/* { dg-error "conflicts with prior selectio" "" { target *-*-* } 0 } */
+
+void
+foo (void)
+{
+}
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-march=native -march=knl" } */
+
+/* NB: We want to verify that -march=native -march=processor is the same
+ as -march=processor. Since it is very unlikely that GCC will be built
+ on KNL, -march=native will have -mno-avx512er and -march=knl should
+ enable AVX512ER. */
+
+#ifndef __AVX512ER__
+# error __AVX512ER__ is not defined
+#endif