Resolve bugzilla #108150 and #108192 for mingw

Message ID c0e03173-569f-01f5-c5d4-d81a0a9f5ecd@gmail.com
State Accepted
Headers
Series Resolve bugzilla #108150 and #108192 for mingw |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

Jonathan Yong Jan. 11, 2023, 9:56 a.m. UTC
  Are the patches and changelogs OK?
  

Comments

Jonathan Yong Jan. 19, 2023, 9:26 a.m. UTC | #1
On 1/11/23 09:56, Jonathan Yong wrote:
> Are the patches and changelogs OK?

Ping1.
  
Jonathan Yong Jan. 28, 2023, 4:33 p.m. UTC | #2
On 1/19/23 09:26, Jonathan Yong wrote:
> On 1/11/23 09:56, Jonathan Yong wrote:
>> Are the patches and changelogs OK?
> 
> Ping1.
> 

Pushed to master branch.
  

Patch

From 1c9781f7af30e600367682fe0e47128ea85552ab Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Wed, 11 Jan 2023 09:51:02 +0000
Subject: [PATCH 2/2] PR c/108192 - Fix test for mingw

gcc/testsuite/ChangeLog:

	PR c/108192
	* g++.dg/cet-notrack-1.C: Use puts instead of printf,
	so function call is not mangled by __mingw_printf when
	doing assembly symbol inspection.

Signed-off-by: Jonathan Yong <10walls@gmail.com>
---
 gcc/testsuite/g++.dg/cet-notrack-1.C | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/g++.dg/cet-notrack-1.C b/gcc/testsuite/g++.dg/cet-notrack-1.C
index ee98fd43d58..a19eed0fb82 100644
--- a/gcc/testsuite/g++.dg/cet-notrack-1.C
+++ b/gcc/testsuite/g++.dg/cet-notrack-1.C
@@ -18,8 +18,8 @@  B b;
 A& a = b;
 int (A::*amem) () __attribute__((nocf_check)) = &A::foo; // take address
 if ((a.*amem)() == 73) // use the address
-  printf("pass\n");
+  puts("pass\n");
 else
-  printf("fail\n");
+  puts("fail\n");
 return 0;
 }
-- 
2.39.0