On 03/17/2017 01:17 PM, Rainer Orth wrote:
> Jakub Jelinek <ja...@redhat.com> writes:
> 
>> On Fri, Mar 10, 2017 at 02:09:20PM +0100, Martin Liška wrote:
>>> Hello.
>>>
>>> This is follow-up patch which I agreed on with Jakub.
>>> It enables CHKP with LSAN and majority of UBSAN options.
>>>
>>> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
>>>
>>> Ready to be installed?
>>> Martin
>>
>>> >From a410d5e4e028d34dc00b4aa637cdcd3986b971d8 Mon Sep 17 00:00:00 2001
>>> From: marxin <mli...@suse.cz>
>>> Date: Fri, 10 Mar 2017 11:05:27 +0100
>>> Subject: [PATCH] MPX: Fix option handling.
>>>
>>> gcc/ChangeLog:
>>>
>>> 2017-03-10  Martin Liska  <mli...@suse.cz>
>>>
>>>         PR target/65705
>>>         PR target/69804
>>>     * toplev.c (process_options): Enable MPX with LSAN and UBSAN
>>>     (except -fsanitize=bounds and -fsanitize=bounds-strict).
>>
>> Please avoid the ()s, that is confusing with ()s used to surround
>> function etc. names.  Just use UBSAN,
>>      except ... strict.
>>
>>>     * tree-chkp.c (chkp_walk_pointer_assignments): Verify that
>>>     FIELD != NULL.
>>
>>> +     error_at (UNKNOWN_LOCATION,
>>> +               "-fcheck-pointer-bounds is not supported with "
>>> +               "-fsanitize=bounds-strict");
>>> +     flag_check_pointer_bounds = 0;
>>
>> Given the recent i18n discussions, perhaps this ought to be
>> %<-fcheck-pointer-bounds%> and %<-fsanitize=bounds-strict%> and similarly
>> elsewhere (of course not for Address/Thread Sanitizer words).
>>
>> Ok for trunk either way.
> 
> Unfortunately, that last change broke gcc.target/i386/pr65044.c:
> 
> FAIL: gcc.target/i386/pr65044.c  (test for errors, line )
> FAIL: gcc.target/i386/pr65044.c (test for excess errors)
> 
> seen e.g. on Linux/x86_64 and Solaris/x86.
> 
> We have
> 
> Excess errors:
> cc1: error: '-fcheck-pointer-bounds' is not supported with Address Sanitizer
> 
> while the test expects
> 
> /* { dg-error "-fcheck-pointer-bounds is not supported with Address 
> Sanitizer" "" { target *-*-* } 0 } */
> 
> I guess that, given gcc-dg.exp hardcodes LANG=C, changing the dg-error
> to just include the single quotes should be enough.
> 
>       Rainer
> 

Will be fixed with following patch.
Similar to what we do in gcc/testsuite/objc.dg/fobjc-exceptions-1.m.

Martin
>From cb4916381ee03cfb6c147a61e85ab1b6c7c634e9 Mon Sep 17 00:00:00 2001
From: marxin <mli...@suse.cz>
Date: Tue, 21 Mar 2017 12:19:49 +0100
Subject: [PATCH] Fix dg-error for a test

gcc/testsuite/ChangeLog:

2017-03-21  Martin Liska  <mli...@suse.cz>

	* gcc.target/i386/pr65044.c: Add '.' in order to catch
	apostrophes.
---
 gcc/testsuite/gcc.target/i386/pr65044.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.target/i386/pr65044.c b/gcc/testsuite/gcc.target/i386/pr65044.c
index 9b0636339e5..d5cfecd15a9 100644
--- a/gcc/testsuite/gcc.target/i386/pr65044.c
+++ b/gcc/testsuite/gcc.target/i386/pr65044.c
@@ -1,6 +1,6 @@
 /* { dg-do compile { target { ! x32 } } } */
 /* { dg-options "-fcheck-pointer-bounds -mmpx -fsanitize=address" } */
-/* { dg-error "-fcheck-pointer-bounds is not supported with Address Sanitizer" "" { target *-*-* } 0 } */
+/* { dg-error ".-fcheck-pointer-bounds. is not supported with Address Sanitizer" "" { target *-*-* } 0 } */
 
 extern int x[];
 
-- 
2.12.0

Reply via email to