PR sanitizer/66452
* toplev.c (check_global_declaration): Don't warn about artificial
decls.
* g++.dg/ubsan/pr66452.C: New test.
From-SVN: r224216
+2015-06-08 Marek Polacek <polacek@redhat.com>
+
+ PR sanitizer/66452
+ * toplev.c (check_global_declaration): Don't warn about artificial
+ decls.
+
2015-06-08 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/66436
+2015-06-08 Marek Polacek <polacek@redhat.com>
+
+ PR sanitizer/66452
+ * g++.dg/ubsan/pr66452.C: New test.
+
2015-06-08 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/66436
--- /dev/null
+// PR sanitizer/66452
+// { dg-do compile }
+// { dg-options "-Wall -fsanitize=undefined" }
+
+class A {
+public:
+ A(int);
+};
+class B {
+ A m_fn1() const;
+};
+A B::m_fn1() const {
+ for (int i = 0;i;)
+ ;
+ return 0;
+}
to handle multiple external decls in different scopes. */
&& ! (DECL_NAME (decl) && TREE_USED (DECL_NAME (decl)))
&& ! DECL_EXTERNAL (decl)
+ && ! DECL_ARTIFICIAL (decl)
&& ! TREE_PUBLIC (decl)
/* A volatile variable might be used in some non-obvious way. */
&& ! TREE_THIS_VOLATILE (decl)