Adapt c-c++-common/tm/malloc.c for Solaris headers with C++
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Mon, 21 Nov 2011 14:28:49 +0000 (14:28 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Mon, 21 Nov 2011 14:28:49 +0000 (14:28 +0000)
* c-c++-common/tm/malloc.c: Scan tree dumps for std::malloc if
*-*-solaris2* && c++.

From-SVN: r181579

gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/tm/malloc.c

index 5c1fb0077d6d69ff7d18282488d06168c88e7a97..3785361a5acc090b6597c682a91d1043d0a74930 100644 (file)
@@ -1,3 +1,8 @@
+2011-11-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       * c-c++-common/tm/malloc.c: Scan tree dumps for std::malloc if
+       *-*-solaris2* && c++.
+
 2011-11-20  Joey Ye  <joey.ye@arm.com>
 
        * gcc.dg/volatile-bitfields-1.c: New.
index de7a766e36cb64742629ea933048270c5d1e3196..81bcc56fc41acd1a6edd5074b4974aff06f2f2d5 100644 (file)
@@ -17,7 +17,9 @@ void foobar(void)
     z = (char *)malloc (666);
 }
 
-/* { dg-final { scan-tree-dump-times " malloc .666" 1 "tmmark" } } */
+/* { dg-final { scan-tree-dump-times " malloc .666" 1 "tmmark" { target { ! { *-*-solaris2* && c++ } } } } } */
+/* Solaris 2 headers are C++-aware and declare std::malloc.  */
+/* { dg-final { scan-tree-dump-times " std::malloc .666" 1 "tmmark" { target { *-*-solaris2* && c++ } } } } */
 /* { dg-final { scan-tree-dump-times "__builtin__ITM_malloc" 1 "tmmark" } } */
 /* { dg-final { scan-tree-dump-times "__builtin__ITM_calloc" 1 "tmmark" } } */
 /* { dg-final { scan-tree-dump-times "__builtin__ITM_free" 2 "tmmark" } } */