Question about generated type for common block in fortran

2017-10-26 Thread Bin.Cheng
Hi, I am looking into DSE transformation of some fortran codes. Given below fortran declarations: real*8 a(len) , b(len) , c(len) , d(len) common /area/ a, b, c, d real*8 src1(len), temp1(len), temp2(len), src2(len) equivalence(src1, a), (src2, b), (temp

Re: Question about generated type for common block in fortran

2017-10-26 Thread Richard Biener
On October 26, 2017 6:47:59 PM GMT+02:00, "Bin.Cheng" wrote: >Hi, >I am looking into DSE transformation of some fortran codes. Given >below fortran declarations: > > real*8 a(len) , b(len) , c(len) , d(len) > common /area/ a, b, c, d > real*8 src1(len), temp1(len), t

Re: Question about generated type for common block in fortran

2017-11-07 Thread Michael Matz
Hi, On Thu, 26 Oct 2017, Richard Biener wrote: > >Hi, > >I am looking into DSE transformation of some fortran codes. Given > >below fortran declarations: > > > > real*8 a(len) , b(len) , c(len) , d(len) > > common /area/ a, b, c, d > > real*8 src1(len), temp1(len), t

Re: Question about generated type for common block in fortran

2017-11-08 Thread Richard Biener
On Tue, Nov 7, 2017 at 4:55 PM, Michael Matz wrote: > Hi, > > On Thu, 26 Oct 2017, Richard Biener wrote: > >> >Hi, >> >I am looking into DSE transformation of some fortran codes. Given >> >below fortran declarations: >> > >> > real*8 a(len) , b(len) , c(len) , d(len) >> > common /ar

Re: Question about generated type for common block in fortran

2017-11-08 Thread Michael Matz
Hi, On Wed, 8 Nov 2017, Richard Biener wrote: > Not sure how - the issue is the FIELD_DECLs overlap which rules out a > RECORD_TYPE and leaves us with a UNION_TYPE. No, as the initial mail already mentioned, for the example in question the overlapping fields can be put into a union which itsel

Re: Question about generated type for common block in fortran

2017-11-08 Thread Richard Biener
On Wed, Nov 8, 2017 at 3:45 PM, Michael Matz wrote: > Hi, > > On Wed, 8 Nov 2017, Richard Biener wrote: > >> Not sure how - the issue is the FIELD_DECLs overlap which rules out a >> RECORD_TYPE and leaves us with a UNION_TYPE. > > No, as the initial mail already mentioned, for the example in > que

Re: Question about generated type for common block in fortran

2017-11-09 Thread Bin.Cheng
On Wed, Nov 8, 2017 at 3:22 PM, Richard Biener wrote: > On Wed, Nov 8, 2017 at 3:45 PM, Michael Matz wrote: >> Hi, >> >> On Wed, 8 Nov 2017, Richard Biener wrote: >> >>> Not sure how - the issue is the FIELD_DECLs overlap which rules out a >>> RECORD_TYPE and leaves us with a UNION_TYPE. >> >> No

Re: Question about generated type for common block in fortran

2017-11-13 Thread Michael Matz
Hi, On Thu, 9 Nov 2017, Bin.Cheng wrote: > So I have two questions here. > A) Is this special kind union type only generated by fortran FE for > equivalence+common? It's not special in that it isn't marked in any way. For all purposes it's a normal union type with surprising field(offset)s. I

Re: Question about generated type for common block in fortran

2017-11-13 Thread Richard Biener
On Mon, Nov 13, 2017 at 11:01 AM, Michael Matz wrote: > Hi, > > On Thu, 9 Nov 2017, Bin.Cheng wrote: > >> So I have two questions here. >> A) Is this special kind union type only generated by fortran FE for >> equivalence+common? > > It's not special in that it isn't marked in any way. For all pu