public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/29892] New: substring out of bounds: Missing variable name for variables with parameter attribute
@ 2006-11-19 11:53 burnus at gcc dot gnu dot org
2006-11-19 12:51 ` [Bug fortran/29892] " fxcoudert at gcc dot gnu dot org
` (10 more replies)
0 siblings, 11 replies; 13+ messages in thread
From: burnus at gcc dot gnu dot org @ 2006-11-19 11:53 UTC (permalink / raw)
To: gcc-bugs
see also: http://gcc.gnu.org/ml/fortran/2006-11/msg00511.html
With -fbounds-check, an error message is shown if the character substrings
exceed the size of the variable. This error message contains also the name of
the variable, but this piece of information is not always passed to
gfc_conv_substring.
There are two places where gfc_conv_substring is called:
a) In gfc_conv_variable
b) In gfc_conv_substring_expr, here the name is always unknown.
I checked it against the regression test suite. The result:
First case, gfc_conv_variable: None found.
Secondly, gfc_conv_substring_expr (tested by adding the following to
gfc_conv_substring_expr:
printf("ERROR: gfc_conv_substring_expr: NO NAME"
"(in file '%s', at line %d)\n", expr->where.lb->file->filename,
expr->where.lb->linenum); ):
Several matches of this kind:
- gfortran.dg/char_cshift_1.f90
a(i1, i2, i3) = 'ab'(i1:i1) // 'cde'(i2:i2) // 'fghi'(i3:i3)
=> Unsolvable as no name exists
Solvable case: gfortran.dg/pr29067.f:
character(len=16),parameter :: s = "", s2 = "1234567890123456"
print *, s(9:16)
print *, s2(9:16)
The problem is that s and s2 have the parameter type
--
Summary: substring out of bounds: Missing variable name for
variables with parameter attribute
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: enhancement
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29892
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/29892] substring out of bounds: Missing variable name for variables with parameter attribute
2006-11-19 11:53 [Bug fortran/29892] New: substring out of bounds: Missing variable name for variables with parameter attribute burnus at gcc dot gnu dot org
@ 2006-11-19 12:51 ` fxcoudert at gcc dot gnu dot org
2006-11-19 12:52 ` fxcoudert at gcc dot gnu dot org
` (9 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-11-19 12:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from fxcoudert at gcc dot gnu dot org 2006-11-19 12:51 -------
I need to do the same for array bounds checking, to identify the cases where no
name is provided and see what we can do about it.
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fxcoudert at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-11-19 12:51:09
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29892
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/29892] substring out of bounds: Missing variable name for variables with parameter attribute
2006-11-19 11:53 [Bug fortran/29892] New: substring out of bounds: Missing variable name for variables with parameter attribute burnus at gcc dot gnu dot org
2006-11-19 12:51 ` [Bug fortran/29892] " fxcoudert at gcc dot gnu dot org
@ 2006-11-19 12:52 ` fxcoudert at gcc dot gnu dot org
2006-11-26 12:26 ` fxcoudert at gcc dot gnu dot org
` (8 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-11-19 12:52 UTC (permalink / raw)
To: gcc-bugs
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |fxcoudert at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2006-11-19 12:51:09 |2006-11-19 12:52:35
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29892
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/29892] substring out of bounds: Missing variable name for variables with parameter attribute
2006-11-19 11:53 [Bug fortran/29892] New: substring out of bounds: Missing variable name for variables with parameter attribute burnus at gcc dot gnu dot org
2006-11-19 12:51 ` [Bug fortran/29892] " fxcoudert at gcc dot gnu dot org
2006-11-19 12:52 ` fxcoudert at gcc dot gnu dot org
@ 2006-11-26 12:26 ` fxcoudert at gcc dot gnu dot org
2006-11-26 12:34 ` fxcoudert at gcc dot gnu dot org
` (7 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-11-26 12:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from fxcoudert at gcc dot gnu dot org 2006-11-26 12:26 -------
Subject: Bug 29892
Author: fxcoudert
Date: Sun Nov 26 12:25:50 2006
New Revision: 119223
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119223
Log:
PR fortran/29892
* trans-intrinsic.c (gfc_conv_intrinsic_bound): Use a locus in
the call to gfc_trans_runtime_check.
* trans-array.c (gfc_trans_array_bound_check): Try harder to find
the variable or function name for the runtime error message.
(gfc_trans_dummy_array_bias): Use a locus in the call to
gfc_trans_runtime_check
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-array.c
trunk/gcc/fortran/trans-intrinsic.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29892
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/29892] substring out of bounds: Missing variable name for variables with parameter attribute
2006-11-19 11:53 [Bug fortran/29892] New: substring out of bounds: Missing variable name for variables with parameter attribute burnus at gcc dot gnu dot org
` (2 preceding siblings ...)
2006-11-26 12:26 ` fxcoudert at gcc dot gnu dot org
@ 2006-11-26 12:34 ` fxcoudert at gcc dot gnu dot org
2006-12-11 20:58 ` fxcoudert at gcc dot gnu dot org
` (6 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-11-26 12:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from fxcoudert at gcc dot gnu dot org 2006-11-26 12:34 -------
Fixed for array bounds checking on mainline. I'll backport the patch to 4.2 in
some time.
We still need to figure something out for the substrings case (see comment #0):
> Secondly, gfc_conv_substring_expr (tested by adding the following to
> gfc_conv_substring_expr:
> printf("ERROR: gfc_conv_substring_expr: NO NAME"
> "(in file '%s', at line %d)\n", expr->where.lb->file->filename,
> expr->where.lb->linenum); ):
>
> Several matches of this kind:
> - gfortran.dg/char_cshift_1.f90
> a(i1, i2, i3) = 'ab'(i1:i1) // 'cde'(i2:i2) // 'fghi'(i3:i3)
> => Unsolvable as no name exists
>
> Solvable case: gfortran.dg/pr29067.f:
> character(len=16),parameter :: s = "", s2 = "1234567890123456"
> print *, s(9:16)
> print *, s2(9:16)
> The problem is that s and s2 have the parameter type
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29892
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/29892] substring out of bounds: Missing variable name for variables with parameter attribute
2006-11-19 11:53 [Bug fortran/29892] New: substring out of bounds: Missing variable name for variables with parameter attribute burnus at gcc dot gnu dot org
` (3 preceding siblings ...)
2006-11-26 12:34 ` fxcoudert at gcc dot gnu dot org
@ 2006-12-11 20:58 ` fxcoudert at gcc dot gnu dot org
2007-01-02 14:30 ` fxcoudert at gcc dot gnu dot org
` (5 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-12-11 20:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from fxcoudert at gcc dot gnu dot org 2006-12-11 20:57 -------
Subject: Bug 29892
Author: fxcoudert
Date: Mon Dec 11 20:57:10 2006
New Revision: 119747
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119747
Log:
PR fortran/29892
* trans-intrinsic.c (gfc_conv_intrinsic_bound): Use a locus in
the call to gfc_trans_runtime_check.
* trans-array.c (gfc_trans_array_bound_check): Try harder to find
the variable or function name for the runtime error message.
(gfc_trans_dummy_array_bias): Use a locus in the call to
gfc_trans_runtime_check
PR fortran/29973
* resolve.c (resolve_actual_arglist): Remove the special case for
CHAR.
* intrinsic.c (add_functions): Remove the special case for CHAR.
PR fortran/29711
* error.c (error_print): Handle printf-style position specifiers,
of the form "%3$d".
PR fortran/29973
* gfortran.dg/specifics_1.f90: Remove check for CHAR.
* gfortran.dg/specifics_2.f90: Remove check for CHAR.
* gfortran.dg/specifics_3.f90: Remove.
* gfortran.fortran-torture/execute/specifics.f90: Remove test
for CHAR.
Removed:
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/specifics_3.f90
Modified:
branches/gcc-4_2-branch/gcc/fortran/ChangeLog
branches/gcc-4_2-branch/gcc/fortran/error.c
branches/gcc-4_2-branch/gcc/fortran/intrinsic.c
branches/gcc-4_2-branch/gcc/fortran/resolve.c
branches/gcc-4_2-branch/gcc/fortran/trans-array.c
branches/gcc-4_2-branch/gcc/fortran/trans-intrinsic.c
branches/gcc-4_2-branch/gcc/testsuite/ChangeLog
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/specifics_1.f90
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/specifics_2.f90
branches/gcc-4_2-branch/gcc/testsuite/gfortran.fortran-torture/execute/specifics.f90
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29892
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/29892] substring out of bounds: Missing variable name for variables with parameter attribute
2006-11-19 11:53 [Bug fortran/29892] New: substring out of bounds: Missing variable name for variables with parameter attribute burnus at gcc dot gnu dot org
` (4 preceding siblings ...)
2006-12-11 20:58 ` fxcoudert at gcc dot gnu dot org
@ 2007-01-02 14:30 ` fxcoudert at gcc dot gnu dot org
2007-05-14 21:29 ` mmitchel at gcc dot gnu dot org
` (4 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-01-02 14:30 UTC (permalink / raw)
To: gcc-bugs
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|fxcoudert 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=29892
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/29892] substring out of bounds: Missing variable name for variables with parameter attribute
2006-11-19 11:53 [Bug fortran/29892] New: substring out of bounds: Missing variable name for variables with parameter attribute burnus at gcc dot gnu dot org
` (5 preceding siblings ...)
2007-01-02 14:30 ` fxcoudert at gcc dot gnu dot org
@ 2007-05-14 21:29 ` mmitchel at gcc dot gnu dot org
2007-07-20 3:49 ` mmitchel at gcc dot gnu dot org
` (3 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-05-14 21:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from mmitchel at gcc dot gnu dot org 2007-05-14 22:26 -------
Will not be fixed in 4.2.0; retargeting at 4.2.1.
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.2.0 |4.2.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29892
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/29892] substring out of bounds: Missing variable name for variables with parameter attribute
2006-11-19 11:53 [Bug fortran/29892] New: substring out of bounds: Missing variable name for variables with parameter attribute burnus at gcc dot gnu dot org
` (6 preceding siblings ...)
2007-05-14 21:29 ` mmitchel at gcc dot gnu dot org
@ 2007-07-20 3:49 ` mmitchel at gcc dot gnu dot org
2007-10-09 19:28 ` mmitchel at gcc dot gnu dot org
` (2 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-07-20 3:49 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.2.1 |4.2.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29892
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/29892] substring out of bounds: Missing variable name for variables with parameter attribute
2006-11-19 11:53 [Bug fortran/29892] New: substring out of bounds: Missing variable name for variables with parameter attribute burnus at gcc dot gnu dot org
` (7 preceding siblings ...)
2007-07-20 3:49 ` mmitchel at gcc dot gnu dot org
@ 2007-10-09 19:28 ` mmitchel at gcc dot gnu dot org
2008-02-01 17:00 ` jsm28 at gcc dot gnu dot org
2008-02-01 17:23 ` fxcoudert at gcc dot gnu dot org
10 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-10-09 19:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from mmitchel at gcc dot gnu dot org 2007-10-09 19:21 -------
Change target milestone to 4.2.3, as 4.2.2 has been released.
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.2.2 |4.2.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29892
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/29892] substring out of bounds: Missing variable name for variables with parameter attribute
2006-11-19 11:53 [Bug fortran/29892] New: substring out of bounds: Missing variable name for variables with parameter attribute burnus at gcc dot gnu dot org
` (8 preceding siblings ...)
2007-10-09 19:28 ` mmitchel at gcc dot gnu dot org
@ 2008-02-01 17:00 ` jsm28 at gcc dot gnu dot org
2008-02-01 17:23 ` fxcoudert at gcc dot gnu dot org
10 siblings, 0 replies; 13+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-02-01 17:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from jsm28 at gcc dot gnu dot org 2008-02-01 16:53 -------
4.2.3 is being released now, changing milestones of open bugs to 4.2.4.
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.2.3 |4.2.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29892
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/29892] substring out of bounds: Missing variable name for variables with parameter attribute
2006-11-19 11:53 [Bug fortran/29892] New: substring out of bounds: Missing variable name for variables with parameter attribute burnus at gcc dot gnu dot org
` (9 preceding siblings ...)
2008-02-01 17:00 ` jsm28 at gcc dot gnu dot org
@ 2008-02-01 17:23 ` fxcoudert at gcc dot gnu dot org
10 siblings, 0 replies; 13+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2008-02-01 17:23 UTC (permalink / raw)
To: gcc-bugs
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.2.4 |---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29892
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/29892] substring out of bounds: Missing variable name for variables with parameter attribute
[not found] <bug-29892-4@http.gcc.gnu.org/bugzilla/>
@ 2013-06-25 12:29 ` dominiq at lps dot ens.fr
0 siblings, 0 replies; 13+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-06-25 12:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29892
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |WAITING
--- Comment #8 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Is this PR fixed or not?
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2013-06-25 12:29 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-19 11:53 [Bug fortran/29892] New: substring out of bounds: Missing variable name for variables with parameter attribute burnus at gcc dot gnu dot org
2006-11-19 12:51 ` [Bug fortran/29892] " fxcoudert at gcc dot gnu dot org
2006-11-19 12:52 ` fxcoudert at gcc dot gnu dot org
2006-11-26 12:26 ` fxcoudert at gcc dot gnu dot org
2006-11-26 12:34 ` fxcoudert at gcc dot gnu dot org
2006-12-11 20:58 ` fxcoudert at gcc dot gnu dot org
2007-01-02 14:30 ` fxcoudert at gcc dot gnu dot org
2007-05-14 21:29 ` mmitchel at gcc dot gnu dot org
2007-07-20 3:49 ` mmitchel at gcc dot gnu dot org
2007-10-09 19:28 ` mmitchel at gcc dot gnu dot org
2008-02-01 17:00 ` jsm28 at gcc dot gnu dot org
2008-02-01 17:23 ` fxcoudert at gcc dot gnu dot org
[not found] <bug-29892-4@http.gcc.gnu.org/bugzilla/>
2013-06-25 12:29 ` dominiq at lps dot ens.fr
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).