public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/66257] New: Regression: ELEMENTAL procedure pointer component XX is not allowed as an actual argument
@ 2015-05-22 20:38 gccbugreport.hgitnskl at gmail dot com
2015-05-22 21:17 ` [Bug fortran/66257] [5/6 Regression] " dominiq at lps dot ens.fr
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: gccbugreport.hgitnskl at gmail dot com @ 2015-05-22 20:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66257
Bug ID: 66257
Summary: Regression: ELEMENTAL procedure pointer component XX
is not allowed as an actual argument
Product: gcc
Version: 5.1.0
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gccbugreport.hgitnskl at gmail dot com
Target Milestone: ---
Created attachment 35602
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35602&action=edit
Test code for the error
Hi everyone,
I think this is a regression for the fortran compiler. The given test code in
attachment was working in 4.9. The errors are:
Erreur: ELEMENTAL procedure pointer component ‘e’ is not allowed as an actual
argument at (1)
test.f90:54:11:
Om = log10(self%E(z))
1
Erreur: ELEMENTAL procedure pointer component ‘e’ is not allowed as an actual
argument at (1)
The argument, which is a double, is treated as the procedure.
>From gcc-bugs-return-487120-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri May 22 21:06:02 2015
Return-Path: <gcc-bugs-return-487120-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 119519 invoked by alias); 22 May 2015 21:06:02 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 119466 invoked by uid 55); 22 May 2015 21:05:58 -0000
From: "glisse at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug other/63387] Optimize pairs of isnan() calls into a single isunordered()
Date: Fri, 22 May 2015 21:06:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: other
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords: missed-optimization
X-Bugzilla-Severity: normal
X-Bugzilla-Who: glisse at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-63387-4-YoFKdl6qgr@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-63387-4@http.gcc.gnu.org/bugzilla/>
References: <bug-63387-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-05/txt/msg01960.txt.bz2
Content-length: 859
https://gcc.gnu.org/bugzilla/show_bug.cgi?idc387
--- Comment #8 from Marc Glisse <glisse at gcc dot gnu.org> ---
Author: glisse
Date: Fri May 22 21:05:26 2015
New Revision: 223591
URL: https://gcc.gnu.org/viewcvs?rev"3591&root=gcc&view=rev
Log:
2015-05-22 Marc Glisse <marc.glisse@inria.fr>
PR tree-optimization/63387
gcc/
* match.pd ((X /[ex] A) * A -> X): Remove unnecessary condition.
((x ord x) & (y ord y) -> (x ord y),
(x ord x) & (x ord y) -> (x ord y)): New simplifications.
* fold-const.c (tree_unary_nonnegative_warnv_p) <ABS_EXPR>: Handle
vectors like scalars.
gcc/testsuite/
* gcc.dg/pr63387-2.c: New testcase.
Added:
trunk/gcc/testsuite/gcc.dg/pr63387-2.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/fold-const.c
trunk/gcc/match.pd
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/66257] [5/6 Regression] ELEMENTAL procedure pointer component XX is not allowed as an actual argument
2015-05-22 20:38 [Bug fortran/66257] New: Regression: ELEMENTAL procedure pointer component XX is not allowed as an actual argument gccbugreport.hgitnskl at gmail dot com
@ 2015-05-22 21:17 ` dominiq at lps dot ens.fr
2015-05-22 21:42 ` mikael at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-05-22 21:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66257
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-05-22
CC| |burnus at gcc dot gnu.org,
| |janus at gcc dot gnu.org
Summary|Regression: ELEMENTAL |[5/6 Regression] ELEMENTAL
|procedure pointer component |procedure pointer component
|XX is not allowed as an |XX is not allowed as an
|actual argument |actual argument
Ever confirmed|0 |1
Severity|major |normal
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Likely introduced by revision r218751 for pr63727 (see the thread starting at
https://gcc.gnu.org/ml/fortran/2014-12/msg00075.html).
Although I have marked the PR as a regression, I am not sure that it is not
INVALID: the error has been introduced on purpose.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/66257] [5/6 Regression] ELEMENTAL procedure pointer component XX is not allowed as an actual argument
2015-05-22 20:38 [Bug fortran/66257] New: Regression: ELEMENTAL procedure pointer component XX is not allowed as an actual argument gccbugreport.hgitnskl at gmail dot com
2015-05-22 21:17 ` [Bug fortran/66257] [5/6 Regression] " dominiq at lps dot ens.fr
@ 2015-05-22 21:42 ` mikael at gcc dot gnu.org
2015-05-22 21:46 ` mikael at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: mikael at gcc dot gnu.org @ 2015-05-22 21:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66257
Mikael Morin <mikael at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikael at gcc dot gnu.org
--- Comment #2 from Mikael Morin <mikael at gcc dot gnu.org> ---
Draft patch, not tested
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index fbf260f..a46ab60 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -1981,7 +1981,8 @@ resolve_actual_arglist (gfc_actual_arglist *arg,
procedure_type ptype,
}
comp = gfc_get_proc_ptr_comp(e);
- if (comp && comp->attr.elemental)
+ if (e->expr_type == EXPR_VARIABLE
+ && comp && comp->attr.elemental)
{
gfc_error ("ELEMENTAL procedure pointer component %qs is not "
"allowed as an actual argument at %L", comp->name,
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/66257] [5/6 Regression] ELEMENTAL procedure pointer component XX is not allowed as an actual argument
2015-05-22 20:38 [Bug fortran/66257] New: Regression: ELEMENTAL procedure pointer component XX is not allowed as an actual argument gccbugreport.hgitnskl at gmail dot com
2015-05-22 21:17 ` [Bug fortran/66257] [5/6 Regression] " dominiq at lps dot ens.fr
2015-05-22 21:42 ` mikael at gcc dot gnu.org
@ 2015-05-22 21:46 ` mikael at gcc dot gnu.org
2015-05-24 14:56 ` mikael at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: mikael at gcc dot gnu.org @ 2015-05-22 21:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66257
--- Comment #3 from Mikael Morin <mikael at gcc dot gnu.org> ---
(In reply to Dominique d'Humieres from comment #1)
> Although I have marked the PR as a regression, I am not sure that it is not
> INVALID: the error has been introduced on purpose.
I think the error applies to procedure pointers, not to the result of procedure
pointer calls. I haven't checked the standard yet though.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/66257] [5/6 Regression] ELEMENTAL procedure pointer component XX is not allowed as an actual argument
2015-05-22 20:38 [Bug fortran/66257] New: Regression: ELEMENTAL procedure pointer component XX is not allowed as an actual argument gccbugreport.hgitnskl at gmail dot com
` (2 preceding siblings ...)
2015-05-22 21:46 ` mikael at gcc dot gnu.org
@ 2015-05-24 14:56 ` mikael at gcc dot gnu.org
2015-05-29 19:05 ` mikael at gcc dot gnu.org
2015-05-29 19:41 ` mikael at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: mikael at gcc dot gnu.org @ 2015-05-24 14:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66257
--- Comment #4 from Mikael Morin <mikael at gcc dot gnu.org> ---
Author: mikael
Date: Sun May 24 14:55:50 2015
New Revision: 223631
URL: https://gcc.gnu.org/viewcvs?rev=223631&root=gcc&view=rev
Log:
PR fortran/66257
gcc/fortran/
* resolve.c (resolve_actual_arglist): Don't throw an error
if the argument with procedure pointer component is not a variable.
gcc/testsuite/
* typebound_call_27.f90: New file.
Added:
trunk/gcc/testsuite/gfortran.dg/typebound_call_27.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/66257] [5/6 Regression] ELEMENTAL procedure pointer component XX is not allowed as an actual argument
2015-05-22 20:38 [Bug fortran/66257] New: Regression: ELEMENTAL procedure pointer component XX is not allowed as an actual argument gccbugreport.hgitnskl at gmail dot com
` (3 preceding siblings ...)
2015-05-24 14:56 ` mikael at gcc dot gnu.org
@ 2015-05-29 19:05 ` mikael at gcc dot gnu.org
2015-05-29 19:41 ` mikael at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: mikael at gcc dot gnu.org @ 2015-05-29 19:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66257
--- Comment #5 from Mikael Morin <mikael at gcc dot gnu.org> ---
Author: mikael
Date: Fri May 29 19:04:30 2015
New Revision: 223875
URL: https://gcc.gnu.org/viewcvs?rev=223875&root=gcc&view=rev
Log:
PR fortran/66257
gcc/fortran/
* resolve.c (resolve_actual_arglist): Don't throw an error
if the argument with procedure pointer component is not a variable.
gcc/testsuite/
* typebound_call_27.f90: New file.
Added:
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/typebound_call_27.f90
Modified:
branches/gcc-5-branch/gcc/fortran/ChangeLog
branches/gcc-5-branch/gcc/fortran/resolve.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/66257] [5/6 Regression] ELEMENTAL procedure pointer component XX is not allowed as an actual argument
2015-05-22 20:38 [Bug fortran/66257] New: Regression: ELEMENTAL procedure pointer component XX is not allowed as an actual argument gccbugreport.hgitnskl at gmail dot com
` (4 preceding siblings ...)
2015-05-29 19:05 ` mikael at gcc dot gnu.org
@ 2015-05-29 19:41 ` mikael at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: mikael at gcc dot gnu.org @ 2015-05-29 19:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66257
Mikael Morin <mikael at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from Mikael Morin <mikael at gcc dot gnu.org> ---
Fixed for 6.1 and 5.2.
Closing.
Thanks for the bug report.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-05-29 19:41 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-22 20:38 [Bug fortran/66257] New: Regression: ELEMENTAL procedure pointer component XX is not allowed as an actual argument gccbugreport.hgitnskl at gmail dot com
2015-05-22 21:17 ` [Bug fortran/66257] [5/6 Regression] " dominiq at lps dot ens.fr
2015-05-22 21:42 ` mikael at gcc dot gnu.org
2015-05-22 21:46 ` mikael at gcc dot gnu.org
2015-05-24 14:56 ` mikael at gcc dot gnu.org
2015-05-29 19:05 ` mikael at gcc dot gnu.org
2015-05-29 19:41 ` mikael 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).