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: Infamous PR fortran/19925


Steve,

It looks good to me - I'm just out of the door for the weekend (for
once!) - I'll attend to it tomorrow night if nobody beats me to it.

Thanks for the patch!

Paul

On Sat, Sep 20, 2008 at 12:49 AM, Steve Kargl
<sgk@troutmask.apl.washington.edu> wrote:
> On Sun, Sep 14, 2008 at 11:20:57AM +0200, Paul Richard Thomas wrote:
>> Steve,
>>
>> On Sun, Sep 14, 2008 at 7:17 AM, Steve Kargl
>> <sgk@troutmask.apl.washington.edu> wrote:
>> > Well, I spent some time last week thinking about PR
>> > fortran/19925 and have decided that the best option
>> > may be to punt.  Consider the somewhat far fetched
>> > but legal Fortran,
>>
>> I concur with you completely on this.  I have visited this PR on one
>> or two occasions and have failed to come up with any better
>> alternative.  Maybe a warning like that at the head of module files
>> should be emitted? :-)
>>
>> OK for trunk
>>
>
> I no longer have commit access to the tree, so someone will need
> to do the commit.
>
> Here's a new patch that adds twoi testcases and it changes an error
> message from "Error: Initialization expression didn't reduce (1)"
> to "Error: Initialization expression didn't reduce (1).  The
> -fmax-array-constructor option may be required"
>
> troutmask:sgk[204] cat g.f90
> INTEGER, PARAMETER :: N=70000
> INTEGER, PARAMETER :: I(N)=(/(MOD(K,2),K=1,N)/)
> INTEGER, PARAMETER :: M(N)=I(N:1:-1)
> print *, i(5)
> END
>
> troutmask:sgk[205] gfc4x -o z g.f90
> g.f90:3.36:
>
> INTEGER, PARAMETER :: M(N)=I(N:1:-1)
>                                   1
> Error: Initialization expression didn't reduce (1).  The -fmax-array-constructor option may be required
> troutmask:sgk[206] gfc4x -o z -fmax-array-constructor=70000 g.f90
>
>
> 2008-09-19  Steven G. Kargl  <kargls@comcast.net>
>
>        PR fortran/19925
>        * gfortran.dg/initialization_20.f90: New test.
>        * gfortran.dg/initialization_21.f90: Ditto.
>
> 2008-09-19  Steven G. Kargl  <kargls@comcast.net>
>
>        PR fortran/19925
>        * trans-array.c (gfc_trans_array_constructor_value): Fix comment.
>        (gfc_conv_array_initializer): Convert internal_error() to gfc_error_now.
>        * array.c: Remove GFC_MAX_AC_EXPAND macro.
>        (gfc_expand_constructor): Use gfc_option.flag_max_array_constructor.
>        * gfortran.h (gfc_option): Add flag_max_array_constructor member.
>        * lang.opt: Add -fmax-array-constructor option.
>        * expr.c (gfc_match_init_expr): Fix error message to mention new option.
>        * invoke.texi: Document new option.
>        * options.c(gfc_init_options): Set default value for new option.
>        (gfc_handle_option): Deal with commandline.
>
> --
> Steve
>



-- 
The knack of flying is learning how to throw yourself at the ground and miss.
 --Hitchhikers Guide to the Galaxy


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