On 30/11/16 17:22, Kyrill Tkachov wrote: > > On 30/11/16 12:05, Andre Vieira (lists) wrote: >> Hi, >> >> I got a bug report against the old version of this patch and fixed it >> here. This had to do with GCC optimizations sharing types with and >> without the 'cmse_nonsecure_call' attribute. The patch now no longer >> sets the main variant, this didn't seem to do what I thought it did. >> Instead the patch now creates distinct type copies for every declared >> pointer that eventually points to the function type with the attribute, >> it will also create a distinct copy for the function type itself. >> Another change in this patch was to make 'arm_comp_type_attributes', the >> ARM implementation of TARGET_COMP_TYPE_ATTRIBUTES, deny compatibility >> between function types with the attribute and without. >> >> I added a test case to test the issue solved with these changes. > > Ok. > Thanks, > Kyrill > >> *** gcc/ChangeLog *** >> 2016-11-xx Andre Vieira >> Thomas Preud'homme >> >> * config/arm/arm.c (gimplify.h): New include. >> (arm_handle_cmse_nonsecure_call): New. >> (arm_attribute_table): Added cmse_nonsecure_call. >> (arm_comp_type_attributes): Deny compatibility of function types >> with >> without the cmse_nonsecure_call attribute. >> * doc/extend.texi (ARM ARMv8-M Security Extensions): New >> attribute. >> >> *** gcc/testsuite/ChangeLog *** >> 2016-11-xx Andre Vieira >> Thomas Preud'homme >> >> * gcc.target/arm/cmse/cmse-3.c: Add tests. >> * gcc.target/arm/cmse/cmse-4.c: Add tests. >> * gcc.target/arm/cmse/cmse-15.c: New. >> >> >> Cheers, >> Andre > Hi, Backported this to the embedded-6-branch in revision r243251. Cheers, Andre gcc/ChangeLog.arm: 2016-12-05 Andre Vieira Backport from mainline 2016-12-02 Andre Vieira Thomas Preud'homme * config/arm/arm.c (gimplify.h): New include. (arm_handle_cmse_nonsecure_call): New. (arm_attribute_table): Added cmse_nonsecure_call. (arm_comp_type_attributes): Deny compatibility of function types with without the cmse_nonsecure_call attribute. * doc/extend.texi (ARM ARMv8-M Security Extensions): New attribute. gcc/testsuite/ChangeLog.arm: 2016-12-05 Andre Vieira Backport from mainline 2016-12-02 Andre Vieira Thomas Preud'homme * gcc.target/arm/cmse/cmse-3.c: Add tests. * gcc.target/arm/cmse/cmse-4.c: Add tests. * gcc.target/arm/cmse/cmse-15.c: New.