Here is an updated patch (version #2). Mainly attribute and option names were changed. The test for ICF will be introduced in x86 specific tests (patch 0006-Part-6) as the implementation checks if the CF instrumentation is on to adjust a hash based on 'nocf'_check' attribute presence. In generic part CF instrumentation is off as no implementation exist.
The patch for x86 specific tests (patch 0006-Part-6) is being reviewed by Uros. gcc/testsuite/ * c-c++-common/fcf-protection-1.c: New test. * c-c++-common/fcf-protection-2.c: Likewise. * c-c++-common/fcf-protection-3.c: Likewise. * c-c++-common/fcf-protection-4.c: Likewise. * c-c++-common/fcf-protection-5.c: Likewise. * c-c++-common/attr-nocf-check-1.c: Likewise. * c-c++-common/attr-nocf-check-2.c: Likewise. * c-c++-common/attr-nocf-check-3.c: Likewise. Is it ok for trunk? Thanks, Igor > -----Original Message----- > From: Jeff Law [mailto:l...@redhat.com] > Sent: Friday, August 25, 2017 11:01 PM > To: Tsimbalist, Igor V <igor.v.tsimbal...@intel.com>; 'gcc- > patc...@gcc.gnu.org' <gcc-patches@gcc.gnu.org> > Subject: Re: 0003-Part-3.-Add-tests-for-finstrument-control-flow-and- > notrack attribute > > On 08/01/2017 02:56 AM, Tsimbalist, Igor V wrote: > > Part#3. Add tests for -finstrument-control-flow and notrack attribute. > > > > > > 0003-Part-3.-Add-tests-for-finstrument-control-flow-and-n.patch > > > > > > From 7869de8a0c0ec55c4e9240c2483fefee97bf34c9 Mon Sep 17 00:00:00 > 2001 > > From: Igor Tsimbalist <igor.v.tsimbal...@intel.com> > > Date: Mon, 3 Jul 2017 17:29:08 +0300 > > Subject: [PATCH 3/9] Part#3. Add tests for -finstrument-control-flow > > and notrack attribute. > > > > gcc/testsuite/ > > > > * c-c++-common/finstrument-control-flow.c: New test. > > * c-c++-common/notrack-1.c: Likewise. > > * c-c++-common/notrack-2.c: Likewise. > No concerns with the existing tests. > > We should consider an ICF test as I outlined in an earlier message. > > We should also consider tests where we drop/add the notrack attribute as > ISTM we ought to be getting warnings in those cases. > > Finally, you should consider tests in gcc.target/i386 that verify we generate > the proper instrumentation for a few tests. > > jeff
0003-Add-tests-for-fcf-protection-and-nocf_check-attribut.patch
Description: 0003-Add-tests-for-fcf-protection-and-nocf_check-attribut.patch