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: [fortran, patch] Fix PR15959, character array initialization.


--- Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de> wrote:
> Feng Wang wrote:
> > Yes, it is a really question. In fact we now don't pad parameter string.
> But I
> > think it is another bug. Example follows:
> > 
> > character(len = 10),parameter:: a = 'hello'
> > print *, a, "world"
> > end
> > 
> > And I report this bug as PR20713.
> 
> Hm, I think I ran into this a few weeks ago, but it seems like I didn't open
> a
> PR for it.
> 
> This problem suggests that your patch is either incomplete or attacks the
> problem too late in the compilation chain.

I don't think so. This is not the same problem. Do we expect one patch to fix
all character array bugs?

>  Because this new problem is
> related to constant folding (i.e. 'a' in the print statement gets expanded to
> the literal string "hello" instead of the correct "hello     "), it is clear
> that at the time of constant folding the string length in this example hasn't
> been verified.

I think it is because that the length is not correctly set.

>  IOW I think it would be preferable if a fix to PR 15959 fixed
> PR 20713 along the same way.
> 
Ok. I will try.


Best Regards,
Feng Wang

_________________________________________________________
Do You Yahoo!?
150万曲MP3疯狂搜,带您闯入音乐殿堂
http://music.yisou.com/
美女明星应有尽有,搜遍美图、艳图和酷图
http://image.yisou.com
1G就是1000兆,雅虎电邮自助扩容!
http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/


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