On Fri, Oct 13, 2017 at 12:56 PM, Tsimbalist, Igor V
<igor.v.tsimbal...@intel.com> wrote:
>> -----Original Message-----
>> From: Uros Bizjak [mailto:ubiz...@gmail.com]
>> Sent: Friday, October 13, 2017 10:02 AM
>> To: Tsimbalist, Igor V <igor.v.tsimbal...@intel.com>
>> Cc: gcc-patches@gcc.gnu.org
>> Subject: Re: 0006-Part-6.-Add-x86-tests-for-Intel-CET-implementation
>>
>> On Thu, Oct 12, 2017 at 8:54 PM, Tsimbalist, Igor V
>> <igor.v.tsimbal...@intel.com> wrote:
>> > Attached is an updated patch according to your comments. New tests are
>> > added to test ICF optimization in presence of nocf_check attribute.
>> --- a/gcc/testsuite/c-c++-common/fcf-protection-2.c
>> +++ b/gcc/testsuite/c-c++-common/fcf-protection-2.c
>> @@ -1,4 +1,4 @@
>>  /* { dg-do compile } */
>>  /* { dg-options "-fcf-protection=branch" } */
>> -/* { dg-error "'-fcf-protection=branch' is not supported for this target" 
>> "" {
>> target { "i?86-*-* x86_64-*-*" } } 0 } */
>> +/* { dg-error "'-fcf-protection=branch' requires CET support on this
>> target. Use -mcet or one of -mibt, -mshstk options to enable CET" "" { 
>> target {
>> "i?86-*-* x86_64-*-*" } } 0 } */
>>
>> Checking for "-fcf-protection=branch' requires CET support on this target"
>> should be enough. No need to check the whole message here and in other
>> tests.
>
> Fixed as you suggested. Also shortened the checking string for ignoring the
> attribute in attr-nocf-check-1.c and attr-nocf-check-3.c.
>
>>  /* { dg-error "'-fcf-protection=branch' is not supported for this target" 
>> "" {
>> target { ! "i?86-*-* x86_64-*-*" } } 0 } */ diff --git a/gcc/testsuite/c-c++-
>> common/fcf-protection-3.c
>> b/gcc/testsuite/c-c++-common/fcf-protection-3.c
>>
>>
>> --- a/gcc/testsuite/c-c++-common/fcf-protection-4.c
>> +++ b/gcc/testsuite/c-c++-common/fcf-protection-4.c
>> @@ -1,4 +1,4 @@
>>  /* { dg-do compile } */
>>  /* { dg-options "-fcf-protection=none" } */
>> -/* { dg-bogus "'-fcf-protection=none' is not supported for this target" "" {
>> target { "i?86-*-* x86_64-*-*" } } 0 } */
>> +/* { dg-bogus "'-fcf-protection=none' res CET support on this target.
>> Use -mcet or one of -mibt, -mshstk options to enable CET" "" { target { 
>> "i?86-
>> *-* x86_64-*-*" } } 0 } */
>>  /* { dg-bogus "'-fcf-protection=none' is not supported for this target" "" {
>> target { ! "i?86-*-* x86_64-*-*" } } 0 } */ diff --git a/gcc/testsuite/c-c++-
>> common/fcf-protection-5.c
>> b/gcc/testsuite/c-c++-common/fcf-protection-5.c
>>
>> The above test checks for bogus messages? -fcf-protection=none option
>> should not generate any messages. So, the test should check that -fcf-
>> protection=none doesn't generate any error. (And, there is a typo in the
>> message, /s/res/requires.)
>
> The gcc documentation says about dg-bogus
>
> This DejaGnu directive appears on a source line that should not get a message
> matching regexp...
>
> I decided to use dg-bogus to check the absence of the error. Now I removed 
> both
> lines as any additional messages should be caught as an extra messages. 
> Actually
> I will update the fcf-protection-4.c test in the generic patch.
>
> Updated patch is attached.

OK.

Thanks,
Uros.

Reply via email to