]> rtime.felk.cvut.cz Git - fpga/lx-cpu1/gcc-tumbl.git/commitdiff
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 37c9a5282fa87dafbe0761085bd9c179424f90d4..ce2f258a9b1b3583766feb0c3cbd6e8811f4d382 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 950ad8c2fd593d12d16c87331bad2a17e57a3ce5..4b9c11830baa91cc80167d0302c71cfdaf67ab5c 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 be52732ee7653c6138606aca5d46772fdd3d8d29..081f14c2ed5eb1537c2f00f264059c2d1928fb50 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;
+}