* [Bug fortran/31298] Uninitialized variable in f951 (in read_module)
2007-03-21 15:15 [Bug fortran/31298] New: Uninitialized variable in f951 (in read_module) burnus at gcc dot gnu dot org
@ 2007-03-28 1:39 ` jvdelisle at gcc dot gnu dot org
2007-03-28 3:21 ` jvdelisle at gcc dot gnu dot org
` (14 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-03-28 1:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from jvdelisle at gcc dot gnu dot org 2007-03-28 02:39 -------
I will try this one.
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jvdelisle at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-03-28 02:39:22
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31298
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/31298] Uninitialized variable in f951 (in read_module)
2007-03-21 15:15 [Bug fortran/31298] New: Uninitialized variable in f951 (in read_module) burnus at gcc dot gnu dot org
2007-03-28 1:39 ` [Bug fortran/31298] " jvdelisle at gcc dot gnu dot org
@ 2007-03-28 3:21 ` jvdelisle at gcc dot gnu dot org
2007-03-31 21:51 ` burnus at gcc dot gnu dot org
` (13 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-03-28 3:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jvdelisle at gcc dot gnu dot org 2007-03-28 04:21 -------
Valgrind gives no error related to uninitialized when compiling with gfortran.
I am not sure this is a problem of real concern.
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |minor
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31298
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/31298] Uninitialized variable in f951 (in read_module)
2007-03-21 15:15 [Bug fortran/31298] New: Uninitialized variable in f951 (in read_module) burnus at gcc dot gnu dot org
2007-03-28 1:39 ` [Bug fortran/31298] " jvdelisle at gcc dot gnu dot org
2007-03-28 3:21 ` jvdelisle at gcc dot gnu dot org
@ 2007-03-31 21:51 ` burnus at gcc dot gnu dot org
2007-04-15 19:20 ` burnus at gcc dot gnu dot org
` (12 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-03-31 21:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from burnus at gcc dot gnu dot org 2007-03-31 22:51 -------
Created an attachment (id=13312)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13312&action=view)
Preliminary patch
> Valgrind gives no error related to uninitialized when compiling with gfortran.
I think you are using:
valgrind gfortran use_6.f90
this does not work as "gfortran" is only a wrapper program. You need to call
valgrind /..../4.3.0/f951 use_6.f90 ...
as the problem is in f951.
The error is in the line:
if (type == INTERFACE_USER_OP)
new->operator = operator;
of module.c's gfc_match_use as - contrary to my expectation -
gfc_match_generic_spec does not initialize operator for type ==
INTERFACE_USER_OP.
Attached: First draft of a patch, which fixes:
a) Uninitialized variable
b) Better error message for operator(.foo.) => operator(.gt.)
(use-defined-operator shall not identify a generic-binding, C1111/R1111)
c) Allow operator(.gt.) => operator(.foo.)
(c) is not working and gives error messages such as:
Operands of comparison operator '.gt.' at (1) are TYPE(bar)/TYPE(bar)
(Could someone check whether I read C1111/R1111 (in Section 11.2.1 of the
Fortran 2003 standard) correctly that .gt.=>.foo. is allowed and .foo. => .gt.
forbidden? As both g95 and NAG f95 do not seem to support renaming of
operators, I can not even check what other compilers are doing.)
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|jvdelisle at gcc dot gnu dot|burnus at gcc dot gnu dot
|org |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31298
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/31298] Uninitialized variable in f951 (in read_module)
2007-03-21 15:15 [Bug fortran/31298] New: Uninitialized variable in f951 (in read_module) burnus at gcc dot gnu dot org
` (2 preceding siblings ...)
2007-03-31 21:51 ` burnus at gcc dot gnu dot org
@ 2007-04-15 19:20 ` burnus at gcc dot gnu dot org
2007-04-18 9:18 ` burnus at gcc dot gnu dot org
` (11 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-04-15 19:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from burnus at gcc dot gnu dot org 2007-04-15 20:20 -------
Created an attachment (id=13369)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13369&action=view)
Updated patch
This patch handles almost everything except of
operator(<intrinsic>) => operator(.user.)
where <intrinsic> could be e.g. ".gt." or "-" or ...
One probably needs also a check whether the user operator is an unary or binary
operator, which should match the intrinsic operator.
Difference to previous patch:
allow: "use mod, only: assignment(=)"
disallow: "use mod, only: assignment(=) => operator(.user.)
(Before the former one was rejected and the latter accepted.)
As collateral damage it seems to fix PR 29876. (At least I get a proper error
message with this patch and no error message for .none. without this patch
[which is different to the reported behaviour.])
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #13312|0 |1
is obsolete| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31298
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/31298] Uninitialized variable in f951 (in read_module)
2007-03-21 15:15 [Bug fortran/31298] New: Uninitialized variable in f951 (in read_module) burnus at gcc dot gnu dot org
` (3 preceding siblings ...)
2007-04-15 19:20 ` burnus at gcc dot gnu dot org
@ 2007-04-18 9:18 ` burnus at gcc dot gnu dot org
2007-05-22 12:32 ` fxcoudert at gcc dot gnu dot org
` (10 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-04-18 9:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from burnus at gcc dot gnu dot org 2007-04-18 10:18 -------
(In reply to comment #4)
Another thing which needs to be supported:
use mod, only: operator(foo) => operator(.op.), &
operator(bar) => operator(.op.), &
operator(op), &
operator(+) => operator(.op.)
namely: importing the same operator under different names.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31298
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/31298] Uninitialized variable in f951 (in read_module)
2007-03-21 15:15 [Bug fortran/31298] New: Uninitialized variable in f951 (in read_module) burnus at gcc dot gnu dot org
` (4 preceding siblings ...)
2007-04-18 9:18 ` burnus at gcc dot gnu dot org
@ 2007-05-22 12:32 ` fxcoudert at gcc dot gnu dot org
2007-05-22 12:45 ` burnus at gcc dot gnu dot org
` (9 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-05-22 12:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from fxcoudert at gcc dot gnu dot org 2007-05-22 13:31 -------
Tobias, what is the current status on that bug?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31298
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/31298] Uninitialized variable in f951 (in read_module)
2007-03-21 15:15 [Bug fortran/31298] New: Uninitialized variable in f951 (in read_module) burnus at gcc dot gnu dot org
` (5 preceding siblings ...)
2007-05-22 12:32 ` fxcoudert at gcc dot gnu dot org
@ 2007-05-22 12:45 ` burnus at gcc dot gnu dot org
2007-06-23 13:41 ` [Bug fortran/31298] Uninitialized variable in f951 (in read_module) / renaming operator in USE burnus at gcc dot gnu dot org
` (8 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-05-22 12:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from burnus at gcc dot gnu dot org 2007-05-22 13:45 -------
(In reply to comment #6)
> Tobias, what is the current status on that bug?
The attached patch is ok, except it fixes only part of the problem.
I got stuck at:
operator(+) => operator(.op.)
That is: importing an user operator as intrinsic operator. I have several
versions of patches here, which all don't work.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31298
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/31298] Uninitialized variable in f951 (in read_module) / renaming operator in USE
2007-03-21 15:15 [Bug fortran/31298] New: Uninitialized variable in f951 (in read_module) burnus at gcc dot gnu dot org
` (6 preceding siblings ...)
2007-05-22 12:45 ` burnus at gcc dot gnu dot org
@ 2007-06-23 13:41 ` burnus at gcc dot gnu dot org
2007-08-14 21:17 ` burnus at gcc dot gnu dot org
` (7 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-06-23 13:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from burnus at gcc dot gnu dot org 2007-06-23 13:41 -------
Issue which could be solved by the fix for this PR: PR 29876.
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Uninitialized variable in |Uninitialized variable in
|f951 (in read_module) |f951 (in read_module) /
| |renaming operator in USE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31298
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/31298] Uninitialized variable in f951 (in read_module) / renaming operator in USE
2007-03-21 15:15 [Bug fortran/31298] New: Uninitialized variable in f951 (in read_module) burnus at gcc dot gnu dot org
` (7 preceding siblings ...)
2007-06-23 13:41 ` [Bug fortran/31298] Uninitialized variable in f951 (in read_module) / renaming operator in USE burnus at gcc dot gnu dot org
@ 2007-08-14 21:17 ` burnus at gcc dot gnu dot org
2007-08-17 8:14 ` [Bug fortran/31298] F2003: use mod, operator(+) => operator(.userOp.) not supported burnus at gcc dot gnu dot org
` (6 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-08-14 21:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from burnus at gcc dot gnu dot org 2007-08-14 21:16 -------
(From update of attachment 13369)
> strcpy (new->local_name, name);
This does not make much sense for INTERFACE_INTRINSIC_OP.
The problem with being able to import an operator only once is related to PR
33072: operator(.op.), operator(.my.)=>operator(.op) gives an error while
operator(.modproc.),operator(.my.)=>operator(.modproc.)
is found. (.op. should be "interface operator(.op.)" and "modproc" can be any
module procedure.)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31298
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/31298] F2003: use mod, operator(+) => operator(.userOp.) not supported
2007-03-21 15:15 [Bug fortran/31298] New: Uninitialized variable in f951 (in read_module) burnus at gcc dot gnu dot org
` (8 preceding siblings ...)
2007-08-14 21:17 ` burnus at gcc dot gnu dot org
@ 2007-08-17 8:14 ` burnus at gcc dot gnu dot org
2007-08-17 15:10 ` patchapp at dberlin dot org
` (5 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-08-17 8:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from burnus at gcc dot gnu dot org 2007-08-17 08:14 -------
Rejecting "operator(.procedure.)" has been fixed by PR33072.
Accepting multiple renames/imports of an operator ("operator(.op.),
operator(.myop.)=>operator(.op.)") is fixed by the submitted patch
http://gcc.gnu.org/ml/gcc-patches/2007-08/msg01081.html
Remains to be done:
Supporting "operator(+)=>operator(.myPlusOp.)", which can be based on the
attachment 13369 and the submitted patch.
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|wrong-code |rejects-valid
Summary|Uninitialized variable in |F2003: use mod, operator(+)
|f951 (in read_module) / |=> operator(.userOp.) not
|renaming operator in USE |supported
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31298
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/31298] F2003: use mod, operator(+) => operator(.userOp.) not supported
2007-03-21 15:15 [Bug fortran/31298] New: Uninitialized variable in f951 (in read_module) burnus at gcc dot gnu dot org
` (9 preceding siblings ...)
2007-08-17 8:14 ` [Bug fortran/31298] F2003: use mod, operator(+) => operator(.userOp.) not supported burnus at gcc dot gnu dot org
@ 2007-08-17 15:10 ` patchapp at dberlin dot org
2007-08-26 18:37 ` burnus at gcc dot gnu dot org
` (4 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: patchapp at dberlin dot org @ 2007-08-17 15:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from patchapp at dberlin dot org 2007-08-17 15:10 -------
Subject: Bug number PR31298
A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2007-08/msg01081.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31298
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/31298] F2003: use mod, operator(+) => operator(.userOp.) not supported
2007-03-21 15:15 [Bug fortran/31298] New: Uninitialized variable in f951 (in read_module) burnus at gcc dot gnu dot org
` (10 preceding siblings ...)
2007-08-17 15:10 ` patchapp at dberlin dot org
@ 2007-08-26 18:37 ` burnus at gcc dot gnu dot org
2007-08-26 18:43 ` burnus at gcc dot gnu dot org
` (3 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-08-26 18:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from burnus at gcc dot gnu dot org 2007-08-26 18:37 -------
Subject: Bug 31298
Author: burnus
Date: Sun Aug 26 18:37:23 2007
New Revision: 127812
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=127812
Log:
2007-08-26 Tobias Burnus <burnus@net-b.de>
PR fortran/31298
* module.c (mio_symbol_ref,mio_interface_rest): Return pointer_info.
(load_operator_interfaces): Support multible loading of an operator.
2007-08-26 Tobias Burnus <burnus@net-b.de>
PR fortran/31298
* gfortran.dg/use_10.f90: New.
Added:
trunk/gcc/testsuite/gfortran.dg/use_10.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/module.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31298
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/31298] F2003: use mod, operator(+) => operator(.userOp.) not supported
2007-03-21 15:15 [Bug fortran/31298] New: Uninitialized variable in f951 (in read_module) burnus at gcc dot gnu dot org
` (11 preceding siblings ...)
2007-08-26 18:37 ` burnus at gcc dot gnu dot org
@ 2007-08-26 18:43 ` burnus at gcc dot gnu dot org
2008-01-15 15:33 ` burnus at gcc dot gnu dot org
` (2 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-08-26 18:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from burnus at gcc dot gnu dot org 2007-08-26 18:43 -------
REMAINING: operator(generic opterator) => operator(user operator)
e.g. operator(+) => operator(.myplus.)
For obvious reasons the reversed is not allowed (MR&C claims that also the
former is invalid, but I think they err.)
Starting point could be the attachment #13369 and something enhancement of the
previous patch.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31298
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/31298] F2003: use mod, operator(+) => operator(.userOp.) not supported
2007-03-21 15:15 [Bug fortran/31298] New: Uninitialized variable in f951 (in read_module) burnus at gcc dot gnu dot org
` (12 preceding siblings ...)
2007-08-26 18:43 ` burnus at gcc dot gnu dot org
@ 2008-01-15 15:33 ` burnus at gcc dot gnu dot org
2008-03-14 16:46 ` rguenth at gcc dot gnu dot org
2009-11-01 18:06 ` burnus at gcc dot gnu dot org
15 siblings, 0 replies; 17+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-01-15 15:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from burnus at gcc dot gnu dot org 2008-01-15 15:21 -------
Check that the renamed imported operator is not imported again, see PR 33541.
If I recall correctly, this part is missing for the patch in PR 33541
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31298
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/31298] F2003: use mod, operator(+) => operator(.userOp.) not supported
2007-03-21 15:15 [Bug fortran/31298] New: Uninitialized variable in f951 (in read_module) burnus at gcc dot gnu dot org
` (13 preceding siblings ...)
2008-01-15 15:33 ` burnus at gcc dot gnu dot org
@ 2008-03-14 16:46 ` rguenth at gcc dot gnu dot org
2009-11-01 18:06 ` burnus at gcc dot gnu dot org
15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-03-14 16:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from rguenth at gcc dot gnu dot org 2008-03-14 16:45 -------
Shouldn't have a target milestone (no regression and not fixed)
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.3.0 |---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31298
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/31298] F2003: use mod, operator(+) => operator(.userOp.) not supported
2007-03-21 15:15 [Bug fortran/31298] New: Uninitialized variable in f951 (in read_module) burnus at gcc dot gnu dot org
` (14 preceding siblings ...)
2008-03-14 16:46 ` rguenth at gcc dot gnu dot org
@ 2009-11-01 18:06 ` burnus at gcc dot gnu dot org
15 siblings, 0 replies; 17+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-11-01 18:06 UTC (permalink / raw)
To: gcc-bugs
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|burnus at gcc dot gnu dot |unassigned at gcc dot gnu
|org |dot org
Status|ASSIGNED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31298
^ permalink raw reply [flat|nested] 17+ messages in thread