public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/68108] [6 regression] erroneous error message 'scalar integer expression expected'
[not found] <bug-68108-4@http.gcc.gnu.org/bugzilla/>
@ 2015-10-27 9:51 ` rguenth at gcc dot gnu.org
2015-10-27 10:52 ` mikael at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-10-27 9:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68108
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |6.0
Summary|[6.0 regression] erroneous |[6 regression] erroneous
|error message 'scalar |error message 'scalar
|integer expression |integer expression
|expected' |expected'
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/68108] [6 regression] erroneous error message 'scalar integer expression expected'
[not found] <bug-68108-4@http.gcc.gnu.org/bugzilla/>
2015-10-27 9:51 ` [Bug fortran/68108] [6 regression] erroneous error message 'scalar integer expression expected' rguenth at gcc dot gnu.org
@ 2015-10-27 10:52 ` mikael at gcc dot gnu.org
2015-10-27 10:54 ` mikael at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 8+ messages in thread
From: mikael at gcc dot gnu.org @ 2015-10-27 10:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68108
Mikael Morin <mikael at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hjl.tools at gmail dot com
--- Comment #2 from Mikael Morin <mikael at gcc dot gnu.org> ---
*** Bug 68111 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/68108] [6 regression] erroneous error message 'scalar integer expression expected'
[not found] <bug-68108-4@http.gcc.gnu.org/bugzilla/>
2015-10-27 9:51 ` [Bug fortran/68108] [6 regression] erroneous error message 'scalar integer expression expected' rguenth at gcc dot gnu.org
2015-10-27 10:52 ` mikael at gcc dot gnu.org
@ 2015-10-27 10:54 ` mikael at gcc dot gnu.org
2015-10-27 13:44 ` sgk at troutmask dot apl.washington.edu
` (4 subsequent siblings)
7 siblings, 0 replies; 8+ messages in thread
From: mikael at gcc dot gnu.org @ 2015-10-27 10:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68108
Mikael Morin <mikael at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikael at gcc dot gnu.org
--- Comment #3 from Mikael Morin <mikael at gcc dot gnu.org> ---
(In reply to kargl from comment #1)
> Tentative patch
>
> Index: decl.c
> ===================================================================
> --- decl.c (revision 229390)
> +++ decl.c (working copy)
> @@ -754,7 +754,8 @@ char_len_param_value (gfc_expr **expr, b
>
> gfc_reduce_init_expr (e);
>
> - if ((e->ref && e->ref->u.ar.type != AR_ELEMENT)
> + if ((e->ref && e->ref->type == REF_ARRAY
> + && e->ref->u.ar.type != AR_ELEMENT)
> || (!e->ref && e->expr_type == EXPR_ARRAY))
There is another unguarded ref->u.ar access a few lines above.
It doesn't trigger as often, because it's a == condition, but it's still worth
fixing.
Otherwise looks good.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/68108] [6 regression] erroneous error message 'scalar integer expression expected'
[not found] <bug-68108-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2015-10-27 10:54 ` mikael at gcc dot gnu.org
@ 2015-10-27 13:44 ` sgk at troutmask dot apl.washington.edu
2015-10-27 16:43 ` kargl at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 8+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2015-10-27 13:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68108
--- Comment #4 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Tue, Oct 27, 2015 at 10:54:53AM +0000, mikael at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68108
>
> --- Comment #3 from Mikael Morin <mikael at gcc dot gnu.org> ---
> (In reply to kargl from comment #1)
> > Tentative patch
> >
> > Index: decl.c
> > ===================================================================
> > --- decl.c (revision 229390)
> > +++ decl.c (working copy)
> > @@ -754,7 +754,8 @@ char_len_param_value (gfc_expr **expr, b
> >
> > gfc_reduce_init_expr (e);
> >
> > - if ((e->ref && e->ref->u.ar.type != AR_ELEMENT)
> > + if ((e->ref && e->ref->type == REF_ARRAY
> > + && e->ref->u.ar.type != AR_ELEMENT)
> > || (!e->ref && e->expr_type == EXPR_ARRAY))
>
> There is another unguarded ref->u.ar access a few lines above.
> It doesn't trigger as often, because it's a == condition, but it's still worth
> fixing.
> Otherwise looks good.
>
Thanks for pointing out the other condition.
I'll commit the fix later today.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/68108] [6 regression] erroneous error message 'scalar integer expression expected'
[not found] <bug-68108-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2015-10-27 13:44 ` sgk at troutmask dot apl.washington.edu
@ 2015-10-27 16:43 ` kargl at gcc dot gnu.org
2015-10-27 16:48 ` kargl at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 8+ messages in thread
From: kargl at gcc dot gnu.org @ 2015-10-27 16:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68108
--- Comment #5 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Tue Oct 27 16:42:24 2015
New Revision: 229446
URL: https://gcc.gnu.org/viewcvs?rev=229446&root=gcc&view=rev
Log:
2015-10-27 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/68108
* decl.c (char_len_param_value): Check for REF_ARRAY.
2015-10-27 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/68108
* gfortran.dg/pr67805_2.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/pr67805_2.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/decl.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/68108] [6 regression] erroneous error message 'scalar integer expression expected'
[not found] <bug-68108-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2015-10-27 16:43 ` kargl at gcc dot gnu.org
@ 2015-10-27 16:48 ` kargl at gcc dot gnu.org
2015-10-29 19:38 ` kargl at gcc dot gnu.org
2015-10-29 19:41 ` kargl at gcc dot gnu.org
7 siblings, 0 replies; 8+ messages in thread
From: kargl at gcc dot gnu.org @ 2015-10-27 16:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68108
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from kargl at gcc dot gnu.org ---
I've committed a patch that should fix this
regression. Sorry about the inconvenience.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/68108] [6 regression] erroneous error message 'scalar integer expression expected'
[not found] <bug-68108-4@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2015-10-27 16:48 ` kargl at gcc dot gnu.org
@ 2015-10-29 19:38 ` kargl at gcc dot gnu.org
2015-10-29 19:41 ` kargl at gcc dot gnu.org
7 siblings, 0 replies; 8+ messages in thread
From: kargl at gcc dot gnu.org @ 2015-10-29 19:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68108
--- Comment #8 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Thu Oct 29 19:37:59 2015
New Revision: 229553
URL: https://gcc.gnu.org/viewcvs?rev=229553&root=gcc&view=rev
Log:
2015-10-29 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/67805
PR fortran/68108
* array.c (gfc_match_array_constructor): Check for error from type
spec matching.
* decl.c (char_len_param_value): Check for valid of charlen parameter.
Check for REF_ARRAY. Reap dead code dating to 2008.
match.c (gfc_match_type_spec): Special case the keyword use in REAL.
2015-10-29 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/67805
PR fortran/68108
* gfortran.dg/pr67805.f90: New testcase.
* gfortran.dg/pr67805_2.f90: New test.
* gfortran.dg/array_constructor_26.f03: Update testcase.
* gfortran.dg/array_constructor_27.f03: Ditto.
* gfortran.dg/char_type_len_2.f90: Ditto.
* gfortran.dg/pr67802.f90: Ditto.
* gfortran.dg/used_before_typed_3.f90: Ditto.
Added:
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr67805.f90
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr67805_2.f90
Modified:
branches/gcc-5-branch/gcc/fortran/ChangeLog
branches/gcc-5-branch/gcc/fortran/array.c
branches/gcc-5-branch/gcc/fortran/decl.c
branches/gcc-5-branch/gcc/fortran/match.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/array_constructor_26.f03
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/array_constructor_27.f03
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/char_type_len_2.f90
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/large_real_kind_3.F90
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr67802.f90
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/used_before_typed_3.f90
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/68108] [6 regression] erroneous error message 'scalar integer expression expected'
[not found] <bug-68108-4@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2015-10-29 19:38 ` kargl at gcc dot gnu.org
@ 2015-10-29 19:41 ` kargl at gcc dot gnu.org
7 siblings, 0 replies; 8+ messages in thread
From: kargl at gcc dot gnu.org @ 2015-10-29 19:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68108
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|6.0 |5.3
--- Comment #9 from kargl at gcc dot gnu.org ---
Fixed on trunk and 5-branch. Thanks for the bug report.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-10-29 19:41 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-68108-4@http.gcc.gnu.org/bugzilla/>
2015-10-27 9:51 ` [Bug fortran/68108] [6 regression] erroneous error message 'scalar integer expression expected' rguenth at gcc dot gnu.org
2015-10-27 10:52 ` mikael at gcc dot gnu.org
2015-10-27 10:54 ` mikael at gcc dot gnu.org
2015-10-27 13:44 ` sgk at troutmask dot apl.washington.edu
2015-10-27 16:43 ` kargl at gcc dot gnu.org
2015-10-27 16:48 ` kargl at gcc dot gnu.org
2015-10-29 19:38 ` kargl at gcc dot gnu.org
2015-10-29 19:41 ` kargl at gcc dot gnu.org
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).