public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug fortran/45748] [4.5/4.6 Regression] -fimplicit-none failures when using intrinsic MAX [not found] <bug-45748-4@http.gcc.gnu.org/bugzilla/> @ 2010-09-30 11:03 ` rguenth at gcc dot gnu.org 2010-10-02 8:06 ` janus at gcc dot gnu.org ` (3 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: rguenth at gcc dot gnu.org @ 2010-09-30 11:03 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45748 Richard Guenther <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P4 Known to fail| | ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/45748] [4.5/4.6 Regression] -fimplicit-none failures when using intrinsic MAX [not found] <bug-45748-4@http.gcc.gnu.org/bugzilla/> 2010-09-30 11:03 ` [Bug fortran/45748] [4.5/4.6 Regression] -fimplicit-none failures when using intrinsic MAX rguenth at gcc dot gnu.org @ 2010-10-02 8:06 ` janus at gcc dot gnu.org 2010-10-02 10:38 ` janus at gcc dot gnu.org ` (2 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: janus at gcc dot gnu.org @ 2010-10-02 8:06 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45748 janus at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |janus at gcc dot gnu.org AssignedTo|unassigned at gcc dot |janus at gcc dot gnu.org |gnu.org | --- Comment #5 from janus at gcc dot gnu.org 2010-10-02 08:06:53 UTC --- The following (pretty obvious) patch fixes it: Index: gcc/fortran/resolve.c =================================================================== --- gcc/fortran/resolve.c (revision 164899) +++ gcc/fortran/resolve.c (working copy) @@ -297,11 +297,9 @@ resolve_formal_arglist (gfc_symbol *proc) continue; } - if (sym->ts.type == BT_UNKNOWN) - { - if (!sym->attr.function || sym->result == sym) - gfc_set_default_type (sym, 1, sym->ns); - } + if (sym->ts.type == BT_UNKNOWN && !proc->attr.intrinsic + && (!sym->attr.function || sym->result == sym)) + gfc_set_default_type (sym, 1, sym->ns); gfc_resolve_array_spec (sym->as, 0); ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/45748] [4.5/4.6 Regression] -fimplicit-none failures when using intrinsic MAX [not found] <bug-45748-4@http.gcc.gnu.org/bugzilla/> 2010-09-30 11:03 ` [Bug fortran/45748] [4.5/4.6 Regression] -fimplicit-none failures when using intrinsic MAX rguenth at gcc dot gnu.org 2010-10-02 8:06 ` janus at gcc dot gnu.org @ 2010-10-02 10:38 ` janus at gcc dot gnu.org 2010-10-09 13:41 ` janus at gcc dot gnu.org 2010-10-09 13:51 ` janus at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: janus at gcc dot gnu.org @ 2010-10-02 10:38 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45748 --- Comment #6 from janus at gcc dot gnu.org 2010-10-02 10:38:45 UTC --- Author: janus Date: Sat Oct 2 10:38:42 2010 New Revision: 164901 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164901 Log: 2010-10-02 Janus Weil <janus@gcc.gnu.org> PR fortran/45748 * resolve.c (resolve_formal_arglist): Avoid setting default type for formal arguments of intrinsic procedures. 2010-10-02 Janus Weil <janus@gcc.gnu.org> PR fortran/45748 * gfortran.dg/intrinsic_6.f90: New. Added: trunk/gcc/testsuite/gfortran.dg/intrinsic_6.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/resolve.c trunk/gcc/testsuite/ChangeLog ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/45748] [4.5/4.6 Regression] -fimplicit-none failures when using intrinsic MAX [not found] <bug-45748-4@http.gcc.gnu.org/bugzilla/> ` (2 preceding siblings ...) 2010-10-02 10:38 ` janus at gcc dot gnu.org @ 2010-10-09 13:41 ` janus at gcc dot gnu.org 2010-10-09 13:51 ` janus at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: janus at gcc dot gnu.org @ 2010-10-09 13:41 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45748 --- Comment #7 from janus at gcc dot gnu.org 2010-10-09 13:41:16 UTC --- Author: janus Date: Sat Oct 9 13:41:12 2010 New Revision: 165223 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=165223 Log: 2010-10-09 Janus Weil <janus@gcc.gnu.org> PR fortran/45748 * resolve.c (resolve_formal_arglist): Avoid setting default type for formal arguments of intrinsic procedures. 2010-10-09 Janus Weil <janus@gcc.gnu.org> PR fortran/45748 * gfortran.dg/intrinsic_6.f90: New. Added: branches/gcc-4_5-branch/gcc/testsuite/gfortran.dg/intrinsic_6.f90 Modified: branches/gcc-4_5-branch/gcc/fortran/ChangeLog branches/gcc-4_5-branch/gcc/fortran/resolve.c branches/gcc-4_5-branch/gcc/testsuite/ChangeLog ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/45748] [4.5/4.6 Regression] -fimplicit-none failures when using intrinsic MAX [not found] <bug-45748-4@http.gcc.gnu.org/bugzilla/> ` (3 preceding siblings ...) 2010-10-09 13:41 ` janus at gcc dot gnu.org @ 2010-10-09 13:51 ` janus at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: janus at gcc dot gnu.org @ 2010-10-09 13:51 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45748 janus at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #8 from janus at gcc dot gnu.org 2010-10-09 13:51:11 UTC --- Fixed on trunk and 4.5. Closing. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/45748] New: -fimplicit-none strange behaviour
@ 2010-09-22 16:13 themos dot tsikas at gmail dot com
2010-09-22 20:22 ` [Bug fortran/45748] [4.5/4.6 Regression] -fimplicit-none failures when using intrinsic MAX burnus at gcc dot gnu dot org
0 siblings, 1 reply; 6+ messages in thread
From: themos dot tsikas at gmail dot com @ 2010-09-22 16:13 UTC (permalink / raw)
To: gcc-bugs
Code:
SUBROUTINE BUG(WORK)
DOUBLE PRECISION WORK(MAX(2,3))
INTRINSIC MAX
END
Compile:
>gfortran -fimplicit-none -c foo.f
foo.f:4.72:
END
1
Error: Symbol 'a1' at (1) has no IMPLICIT type
foo.f:4.72:
END
1
Error: Symbol 'a2' at (1) has no IMPLICIT type
________________________________________________________________
nonsensical error when there shouldn't be one?
Regards
Themos Tsikas
--
Summary: -fimplicit-none strange behaviour
Product: gcc
Version: 4.5.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: themos dot tsikas at gmail dot com
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45748
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/45748] [4.5/4.6 Regression] -fimplicit-none failures when using intrinsic MAX 2010-09-22 16:13 [Bug fortran/45748] New: -fimplicit-none strange behaviour themos dot tsikas at gmail dot com @ 2010-09-22 20:22 ` burnus at gcc dot gnu dot org 0 siblings, 0 replies; 6+ messages in thread From: burnus at gcc dot gnu dot org @ 2010-09-22 20:22 UTC (permalink / raw) To: gcc-bugs ------- Comment #4 from burnus at gcc dot gnu dot org 2010-09-22 20:22 ------- As you might have guessed, the error is with regards to the arguments of MAX which are A1 and A2. The arguments are defined as BT_UNKNOWN, cf. in intrinsics.c: add_sym_1m ("max", GFC_ISYM_MAX, CLASS_ELEMENTAL, ACTUAL_NO, BT_UNKNOWN, 0, GFC_STD_F77, gfc_check_min_max, gfc_simplify_max, gfc_resolve_max, a1, BT_UNKNOWN, dr, REQUIRED, a2, BT_UNKNOWN, dr, REQUIRED); The backtrace shows: #0 gfc_set_default_type (sym=0x144e6b0, error_flag=1, ns=<value optimized out>) at fortran/symbol.c:263 #1 0x00000000005328d7 in resolve_formal_arglist (proc=0x144d1f0) at fortran/resolve.c:303 -- burnus at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords| |rejects-valid Known to fail| |4.5.0 4.6.0 Known to work| |4.4.0 Last reconfirmed|0000-00-00 00:00:00 |2010-09-22 20:22:16 date| | Summary|-fimplicit-none strange |[4.5/4.6 Regression] - |behaviour |fimplicit-none failures when | |using intrinsic MAX Target Milestone|--- |4.5.2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45748 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-10-09 13:51 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <bug-45748-4@http.gcc.gnu.org/bugzilla/> 2010-09-30 11:03 ` [Bug fortran/45748] [4.5/4.6 Regression] -fimplicit-none failures when using intrinsic MAX rguenth at gcc dot gnu.org 2010-10-02 8:06 ` janus at gcc dot gnu.org 2010-10-02 10:38 ` janus at gcc dot gnu.org 2010-10-09 13:41 ` janus at gcc dot gnu.org 2010-10-09 13:51 ` janus at gcc dot gnu.org 2010-09-22 16:13 [Bug fortran/45748] New: -fimplicit-none strange behaviour themos dot tsikas at gmail dot com 2010-09-22 20:22 ` [Bug fortran/45748] [4.5/4.6 Regression] -fimplicit-none failures when using intrinsic MAX burnus at gcc dot gnu dot 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).