PR c++/89105
* config/i386/i386.c (ix86_warn_parameter_passing_abi): Don't warn
for arguments to functions that are TU-local and shouldn't be
referenced by assembly.
* g++.target/i386/pr89105.C: New test.
From-SVN: r268382
+2019-01-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/89105
+ * config/i386/i386.c (ix86_warn_parameter_passing_abi): Don't warn
+ for arguments to functions that are TU-local and shouldn't be
+ referenced by assembly.
+
2019-01-30 Ulrich Drepper <drepper@redhat.com>
* dumpfile.c (opt_info_switch_p_1): Ignore '-' if it appears
if (!TYPE_EMPTY_P (type))
return;
+ /* Don't warn if the function isn't visible outside of the TU. */
+ if (cum->decl && !TREE_PUBLIC (cum->decl))
+ return;
+
const_tree ctx = get_ultimate_context (cum->decl);
if (ctx != NULL_TREE
&& !TRANSLATION_UNIT_WARN_EMPTY_P (ctx))
2019-01-30 Jakub Jelinek <jakub@redhat.com>
+ PR c++/89105
+ * g++.target/i386/pr89105.C: New test.
+
PR c/89061
* gcc.dg/pr89061.c: New test.
--- /dev/null
+// PR c++/89105
+// { dg-do compile { target c++11 } }
+// { dg-options "-fabi-version=12 -Wabi=11" }
+
+namespace {
+ template<typename F>
+ void run(F f, int i) // { dg-bogus "parameter passing ABI changes in -fabi-version=12" }
+ {
+ f(i);
+ }
+}
+
+void f()
+{
+ run([](int) { }, 1); // { dg-bogus "parameter passing ABI changes in -fabi-version=12" }
+}