OSDN Git Service

PR libmudflap/26442
authorreichelt <reichelt@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 1 Jan 2008 23:08:05 +0000 (23:08 +0000)
committerreichelt <reichelt@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 1 Jan 2008 23:08:05 +0000 (23:08 +0000)
* tree-mudflap.c (mx_register_decls): Guard warning by
!DECL_ARTIFICIAL check.

* testsuite/libmudflap.c++/pass60-frag.cxx: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@131249 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree-mudflap.c
libmudflap/ChangeLog
libmudflap/testsuite/libmudflap.c++/pass60-frag.cxx [new file with mode: 0644]

index 37c9a52..ce2f258 100644 (file)
@@ -1,3 +1,9 @@
+2008-01-01  Volker Reichelt  <v.reichelt@netcologne.de>
+
+       PR libmudflap/26442
+       * tree-mudflap.c (mx_register_decls): Guard warning by
+       !DECL_ARTIFICIAL check.
+
 2008-01-01  Jakub Jelinek  <jakub@redhat.com>
 
        * config/i386/sse.md (sse5_pperm, sse5_pperm_pack_v2di_v4si,
index 950ad8c..4b9c118 100644 (file)
@@ -1045,8 +1045,11 @@ mx_register_decls (tree decl, tree *stmt_list)
 
           /* Add the __mf_register call at the current appending point.  */
           if (tsi_end_p (initially_stmts))
-           warning (0, "mudflap cannot track %qs in stub function",
-                    IDENTIFIER_POINTER (DECL_NAME (decl)));
+           {
+             if (!DECL_ARTIFICIAL (decl))
+               warning (0, "mudflap cannot track %qs in stub function",
+                        IDENTIFIER_POINTER (DECL_NAME (decl)));
+           }
          else
            {
              tsi_link_before (&initially_stmts, register_fncall,
index be52732..081f14c 100644 (file)
@@ -1,3 +1,8 @@
+2008-01-01  Volker Reichelt  <v.reichelt@netcologne.de>
+
+       PR libmudflap/26442
+       * testsuite/libmudflap.c++/pass60-frag.cxx: New test.
+
 2007-10-15  Maciej W. Rozycki  <macro@linux-mips.org>
 
        * configure: Regenerate following changes to ../config/tls.m4.
diff --git a/libmudflap/testsuite/libmudflap.c++/pass60-frag.cxx b/libmudflap/testsuite/libmudflap.c++/pass60-frag.cxx
new file mode 100644 (file)
index 0000000..35989d1
--- /dev/null
@@ -0,0 +1,13 @@
+// PR 26442
+
+struct A
+{
+  A();
+};
+
+int main()
+{
+  if (0)
+    A();
+  return 0;
+}