* [Patch, Fortran, Regression] PR 55907: ICE with -fno-automatic -finit-local-zero
@ 2014-02-16 22:11 Janus Weil
2014-02-17 11:21 ` Paul Richard Thomas
0 siblings, 1 reply; 3+ messages in thread
From: Janus Weil @ 2014-02-16 22:11 UTC (permalink / raw)
To: gfortran, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 426 bytes --]
Hi all,
here is a small patch for a ICE-on-valid regression. Regtested on
x86_64-unknown-linux-gnu. Ok for trunk/4.8/4.7?
Cheers,
Janus
2014-02-16 Janus Weil <janus@gcc.gnu.org>
PR fortran/55907
* resolve.c (build_default_init_expr): Don't initialize character
variable if -fno-automatic is given.
2014-02-16 Janus Weil <janus@gcc.gnu.org>
PR fortran/55907
* gfortran.dg/init_flag_12.f90: New.
[-- Attachment #2: pr55907.diff --]
[-- Type: text/plain, Size: 522 bytes --]
Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c (revision 207804)
+++ gcc/fortran/resolve.c (working copy)
@@ -10530,7 +10530,7 @@ build_default_init_expr (gfc_symbol *sym)
init_expr = NULL;
}
if (!init_expr && gfc_option.flag_init_character == GFC_INIT_CHARACTER_ON
- && sym->ts.u.cl->length)
+ && sym->ts.u.cl->length && gfc_option.flag_max_stack_var_size != 0)
{
gfc_actual_arglist *arg;
init_expr = gfc_get_expr ();
[-- Attachment #3: init_flag_12.f90 --]
[-- Type: text/x-fortran, Size: 335 bytes --]
! { dg-do compile }
! { dg-options "-fno-automatic -finit-local-zero" }
!
! PR 55907: [4.7/4.8/4.9 Regression] ICE with -fno-automatic -finit-local-zero
!
! Contributed by J.R. Garcia <garcia.espinosa.jr@gmail.com>
subroutine cchaine (i)
implicit none
integer :: i
character(len=i) :: chaine
write(*,*) chaine
end subroutine
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Patch, Fortran, Regression] PR 55907: ICE with -fno-automatic -finit-local-zero
2014-02-16 22:11 [Patch, Fortran, Regression] PR 55907: ICE with -fno-automatic -finit-local-zero Janus Weil
@ 2014-02-17 11:21 ` Paul Richard Thomas
2014-02-17 12:48 ` Janus Weil
0 siblings, 1 reply; 3+ messages in thread
From: Paul Richard Thomas @ 2014-02-17 11:21 UTC (permalink / raw)
To: Janus Weil; +Cc: gfortran, gcc-patches
Dear Janus,
This is OK for trunk, 4.8 and 4.7.
Thanks for the patch.
Paul
On 16 February 2014 23:11, Janus Weil <janus@gcc.gnu.org> wrote:
> Hi all,
>
> here is a small patch for a ICE-on-valid regression. Regtested on
> x86_64-unknown-linux-gnu. Ok for trunk/4.8/4.7?
>
> Cheers,
> Janus
>
>
> 2014-02-16 Janus Weil <janus@gcc.gnu.org>
>
> PR fortran/55907
> * resolve.c (build_default_init_expr): Don't initialize character
> variable if -fno-automatic is given.
>
>
> 2014-02-16 Janus Weil <janus@gcc.gnu.org>
>
> PR fortran/55907
> * gfortran.dg/init_flag_12.f90: New.
--
The knack of flying is learning how to throw yourself at the ground and miss.
--Hitchhikers Guide to the Galaxy
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Patch, Fortran, Regression] PR 55907: ICE with -fno-automatic -finit-local-zero
2014-02-17 11:21 ` Paul Richard Thomas
@ 2014-02-17 12:48 ` Janus Weil
0 siblings, 0 replies; 3+ messages in thread
From: Janus Weil @ 2014-02-17 12:48 UTC (permalink / raw)
To: Paul Richard Thomas; +Cc: gfortran, gcc-patches
> This is OK for trunk, 4.8 and 4.7.
Thanks, Paul. Committed to trunk as r207823. Will do the backports soon.
Cheers,
Janus
> On 16 February 2014 23:11, Janus Weil <janus@gcc.gnu.org> wrote:
>> Hi all,
>>
>> here is a small patch for a ICE-on-valid regression. Regtested on
>> x86_64-unknown-linux-gnu. Ok for trunk/4.8/4.7?
>>
>> Cheers,
>> Janus
>>
>>
>> 2014-02-16 Janus Weil <janus@gcc.gnu.org>
>>
>> PR fortran/55907
>> * resolve.c (build_default_init_expr): Don't initialize character
>> variable if -fno-automatic is given.
>>
>>
>> 2014-02-16 Janus Weil <janus@gcc.gnu.org>
>>
>> PR fortran/55907
>> * gfortran.dg/init_flag_12.f90: New.
>
>
>
> --
> The knack of flying is learning how to throw yourself at the ground and miss.
> --Hitchhikers Guide to the Galaxy
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-02-17 12:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-16 22:11 [Patch, Fortran, Regression] PR 55907: ICE with -fno-automatic -finit-local-zero Janus Weil
2014-02-17 11:21 ` Paul Richard Thomas
2014-02-17 12:48 ` Janus Weil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).