This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Another patch to prevent invalid subreg generation (fwd)


> I'm resubmitting this again since nobody seemed to want to comment on
> it.
> 
> It prevents an ICE when compiling  for d10v.
> 
> 
> typedef union
> {
>   unsigned char member3;
>   signed short member4;
>   unsigned int member5;
> }
> UNI02;
> 
> struct srt_dat_t
> {
>   UNI02 un2;
>   unsigned long member1;
>   signed short member2;
> };
> 
> struct srt_dat_t exsrt1;
> void
> extern_test (struct srt_dat_t arg1)
> {
>   arg1.un2.member3++;
>   arg1.member1++;
>   arg1.member2++;
> }
> 
> int
> main (void)
> {
>   extern_test (exsrt1);
>   return (0);
> }
I haven't looked at the patch, but I did go ahead and add the test to the
testsuite.
jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]