public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/20881] New: error needed
@ 2005-04-08 16:01 jv244 at cam dot ac dot uk
2005-04-22 15:07 ` [Bug fortran/20881] should check interfaces for lgobal procedures tobi at gcc dot gnu dot org
2005-06-06 0:27 ` pinskia at gcc dot gnu dot org
0 siblings, 2 replies; 7+ messages in thread
From: jv244 at cam dot ac dot uk @ 2005-04-08 16:01 UTC (permalink / raw)
To: gcc-bugs
The following is non-standard and the compiler should probably generate a
warning/error with '-pedantic -std=f95'
SUBROUTINE TT()
CHARACTER(LEN=*), EXTERNAL :: F
CHARACTER(LEN=10) :: T
T=F()
END SUBROUTINE TT
END
SUBROUTINE F
END SUBROUTINE
--
Summary: error needed
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jv244 at cam dot ac dot uk
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20881
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/20881] should check interfaces for lgobal procedures
2005-04-08 16:01 [Bug fortran/20881] New: error needed jv244 at cam dot ac dot uk
@ 2005-04-22 15:07 ` tobi at gcc dot gnu dot org
2005-06-06 0:27 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 7+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-04-22 15:07 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tobi at gcc dot gnu dot org 2005-04-22 15:07 -------
This is not a must-detect error, but something we should (and could) do.
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |accepts-invalid
Last reconfirmed|0000-00-00 00:00:00 |2005-04-22 15:07:15
date| |
Summary|error needed |should check interfaces for
| |lgobal procedures
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20881
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/20881] should check interfaces for lgobal procedures
2005-04-08 16:01 [Bug fortran/20881] New: error needed jv244 at cam dot ac dot uk
2005-04-22 15:07 ` [Bug fortran/20881] should check interfaces for lgobal procedures tobi at gcc dot gnu dot org
@ 2005-06-06 0:27 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-06 0:27 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|enhancement |normal
Keywords| |ice-on-invalid-code
Last reconfirmed|2005-04-22 15:07:15 |2005-06-06 00:27:46
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20881
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/20881] should check interfaces for lgobal procedures
[not found] <bug-20881-6642@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2006-01-27 22:29 ` pault at gcc dot gnu dot org
@ 2006-01-28 21:03 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-28 21:03 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20881
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/20881] should check interfaces for lgobal procedures
[not found] <bug-20881-6642@http.gcc.gnu.org/bugzilla/>
2006-01-21 9:09 ` pault at gcc dot gnu dot org
2006-01-27 22:16 ` pault at gcc dot gnu dot org
@ 2006-01-27 22:29 ` pault at gcc dot gnu dot org
2006-01-28 21:03 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-01-27 22:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pault at gcc dot gnu dot org 2006-01-27 22:29 -------
Fixed on trunk and 4.1
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20881
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/20881] should check interfaces for lgobal procedures
[not found] <bug-20881-6642@http.gcc.gnu.org/bugzilla/>
2006-01-21 9:09 ` pault at gcc dot gnu dot org
@ 2006-01-27 22:16 ` pault at gcc dot gnu dot org
2006-01-27 22:29 ` pault at gcc dot gnu dot org
2006-01-28 21:03 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-01-27 22:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pault at gcc dot gnu dot org 2006-01-27 22:16 -------
Subject: Bug 20881
Author: pault
Date: Fri Jan 27 22:16:04 2006
New Revision: 110310
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110310
Log:
2005-01-28 Paul Thomas <pault@gcc.gnu.org>
PR fortran/25964
* resolve.c (resolve_function): Exclude statement functions from
global reference checking.
PR fortran/25084
PR fortran/20852
PR fortran/25085
PR fortran/25086
* resolve.c (resolve_function): Declare a gfc_symbol to replace the
references through the symtree to the symbol associated with the
function expresion. Give error on reference to an assumed character
length function is defined in an interface or an external function
that is not a dummy argument.
(resolve_symbol): Give error if an assumed character length function
is array-valued, pointer-valued, pure or recursive. Emit warning
that character(*) value functions are obsolescent in F95.
PR fortran/25416
* trans-expr.c (gfc_conv_function_call): The above patch to resolve.c
prevents any assumed character length function call from getting here
except intrinsics such as SPREAD. In this case, ensure that no
segfault occurs from referencing non-existent charlen->length->
expr_type and provide a backend_decl for the charlen from the charlen
of the first actual argument.
Cure temp name confusion.
* trans-expr.c (gfc_get_interface_mapping_array): Change name of
temporary from "parm" to "ifm" to avoid clash with temp coming from
trans-array.c.
PR fortran/25124
PR fortran/25625
* decl.c (get_proc_name): If there is an existing
symbol in the encompassing namespace, call errors
if it is a procedure of the same name or the kind
field is set, indicating a type declaration.
PR fortran/20881
PR fortran/23308
PR fortran/25538
PR fortran/25710
* decl.c (add_global_entry): New function to check
for existing global symbol with this name and to
create new one if none exists.
(gfc_match_entry): Call add_global_entry before
matching argument lists for subroutine and function
entries.
* gfortran.h: Prototype for existing function, global_used.
* resolve.c (resolve_global_procedure): New function
to check global symbols for procedures.
(resolve_call, resolve_function): Calls to this
new function for non-contained and non-module
procedures.
* match.c (match_common): Add check for existing
global symbol, creat one if none exists and emit
error if there is a clash.
* parse.c (global_used): Remove static and use the
gsymbol name rather than the new_block name, so that
the function can be called from resolve.c.
(parse_block_data, parse_module, add_global_procedure):
Improve checks for existing gsymbols. Emit error if
already defined or if references were to another type.
Set defined flag.
PR fortran/24276
* trans-expr.c (gfc_conv_aliased_arg): New function called by
gfc_conv_function_call that coverts an expression for an aliased
component reference to a derived type array into a temporary array
of the same type as the component. The temporary is passed as an
actual argument for the procedure call and is copied back to the
derived type after the call.
(is_aliased_array): New function that detects an array reference
that is followed by a component reference.
(gfc_conv_function_call): Detect an aliased actual argument with
is_aliased_array and convert it to a temporary and back again
using gfc_conv_aliased_arg.
PR fortran/25124
PR fortran/25625
* gfortran.dg/internal_references_1.f90: New test.
PR fortran/25901
* gfortran.dg/internal references_2.f90: New test.
PR fortran/20881
PR fortran/23308
PR fortran/25538
PR fortran/25710
* gfortran.dg/global_references_1.f90: New test.
* gfortran.dg/g77/19990905-1.f: Restore the error that
there is a clash between the common block name and
the name of a subroutine reference.
PR fortran/25964
* gfortran.dg/global_references_2.f90: New test.
PR fortran/24276
* gfortran.dg/aliasing_dummy_1.f90: New test.
PR fortran/25084
PR fortran/20852
PR fortran/25085
PR fortran/25086
* gfortran.dg/assumed_charlen_function_1.f90: New test.
* gfortran.dg/assumed_charlen_function_3.f90: New test.
PR fortran/25416
* gfortran.dg/assumed_charlen_function_2.f90: New test.
PR fortran/25964
* gfortran.dg/assumed_size_refs_3.f90: New test.
Added:
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/aliasing_dummy_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/assumed_charlen_function_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/assumed_charlen_function_2.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/assumed_charlen_function_3.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/assumed_size_refs_3.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/global_references_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/global_references_2.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/internal_references_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/internal_references_2.f90
Modified:
branches/gcc-4_1-branch/gcc/fortran/ChangeLog
branches/gcc-4_1-branch/gcc/fortran/decl.c
branches/gcc-4_1-branch/gcc/fortran/gfortran.h
branches/gcc-4_1-branch/gcc/fortran/match.c
branches/gcc-4_1-branch/gcc/fortran/parse.c
branches/gcc-4_1-branch/gcc/fortran/resolve.c
branches/gcc-4_1-branch/gcc/fortran/symbol.c
branches/gcc-4_1-branch/gcc/fortran/trans-expr.c
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/g77/19990905-1.f
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20881
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/20881] should check interfaces for lgobal procedures
[not found] <bug-20881-6642@http.gcc.gnu.org/bugzilla/>
@ 2006-01-21 9:09 ` pault at gcc dot gnu dot org
2006-01-27 22:16 ` pault at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-01-21 9:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pault at gcc dot gnu dot org 2006-01-21 09:09 -------
Subject: Bug 20881
Author: pault
Date: Sat Jan 21 09:08:54 2006
New Revision: 110063
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110063
Log:
2005-01-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/25124
PR fortran/25625
* decl.c (get_proc_name): If there is an existing
symbol in the encompassing namespace, call errors
if it is a procedure of the same name or the kind
field is set, indicating a type declaration.
PR fortran/20881
PR fortran/23308
PR fortran/25538
PR fortran/25710
* decl.c (add_global_entry): New function to check
for existing global symbol with this name and to
create new one if none exists.
(gfc_match_entry): Call add_global_entry before
matching argument lists for subroutine and function
entries.
* gfortran.h: Prototype for existing function,
global_used.
* resolve.c (resolve_global_procedure): New function
to check global symbols for procedures.
(resolve_call, resolve_function): Calls to this
new function for non-contained and non-module
procedures.
* match.c (match_common): Add check for existing
global symbol, creat one if none exists and emit
error if there is a clash.
* parse.c (global_used): Remove static and use the
gsymbol name rather than the new_block name, so that
the function can be called from resolve.c.
(parse_block_data, parse_module, add_global_procedure):
Improve checks for existing gsymbols. Emit error if
already defined or if references were to another type.
Set defined flag.
PR fortran/PR24276
* trans-expr.c (gfc_conv_aliased_arg): New function called by
gfc_conv_function_call that coverts an expression for an aliased
component reference to a derived type array into a temporary array
of the same type as the component. The temporary is passed as an
actual argument for the procedure call and is copied back to the
derived type after the call.
(is_aliased_array): New function that detects an array reference
that is followed by a component reference.
(gfc_conv_function_call): Detect an aliased actual argument with
is_aliased_array and convert it to a temporary and back again
using gfc_conv_aliased_arg.
2005-01-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/25124
PR fortran/25625
* gfortran.dg/internal_references_1.f90: New test.
PR fortran/20881
PR fortran/23308
PR fortran/25538
PR fortran/25710
* gfortran.dg/global_references_1.f90: New test.
* gfortran.dg/g77/19990905-1.f: Restore the error that
there is a clash between the common block name and
the name of a subroutine reference.
PR fortran/PR24276
* gfortran.dg/aliasing_dummy_1.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/aliasing_dummy_1.f90
trunk/gcc/testsuite/gfortran.dg/global_references_1.f90
trunk/gcc/testsuite/gfortran.dg/internal_references_1.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/decl.c
trunk/gcc/fortran/gfortran.h
trunk/gcc/fortran/match.c
trunk/gcc/fortran/parse.c
trunk/gcc/fortran/resolve.c
trunk/gcc/fortran/trans-expr.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/g77/19990905-1.f
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20881
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-01-28 21:03 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-08 16:01 [Bug fortran/20881] New: error needed jv244 at cam dot ac dot uk
2005-04-22 15:07 ` [Bug fortran/20881] should check interfaces for lgobal procedures tobi at gcc dot gnu dot org
2005-06-06 0:27 ` pinskia at gcc dot gnu dot org
[not found] <bug-20881-6642@http.gcc.gnu.org/bugzilla/>
2006-01-21 9:09 ` pault at gcc dot gnu dot org
2006-01-27 22:16 ` pault at gcc dot gnu dot org
2006-01-27 22:29 ` pault at gcc dot gnu dot org
2006-01-28 21:03 ` pinskia 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).