public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/41827] New: [Cleanup] Remove SET_EXPR_LOCATION in gfc_trans_code
@ 2009-10-26 9:27 janus at gcc dot gnu dot org
2009-11-17 11:48 ` [Bug fortran/41827] " janus at gcc dot gnu dot org
2010-04-30 21:54 ` dfranke at gcc dot gnu dot org
0 siblings, 2 replies; 5+ messages in thread
From: janus at gcc dot gnu dot org @ 2009-10-26 9:27 UTC (permalink / raw)
To: gcc-bugs
At the end of gfc_trans_code one finds the following:
gfc_set_backend_locus (&code->loc);
if (res != NULL_TREE && ! IS_EMPTY_STMT (res))
{
if (TREE_CODE (res) != STATEMENT_LIST)
SET_EXPR_LOCATION (res, input_location);
/* Add the new statement to the block. */
gfc_add_expr_to_block (&block, res);
}
}
/* Return the finished block. */
return gfc_finish_block (&block);
}
In principle the call to SET_EXPR_LOCATION should not be needed here, since the
location should already be set correctly at this point; cf. the discussion in
http://gcc.gnu.org/ml/fortran/2009-10/msg00205.html
and follow-ups. However, this patch
Index: gcc/fortran/trans.c
===================================================================
--- gcc/fortran/trans.c (Revision 153547)
+++ gcc/fortran/trans.c (Arbeitskopie)
@@ -1281,9 +1281,6 @@ gfc_trans_code (gfc_code * code)
if (res != NULL_TREE && ! IS_EMPTY_STMT (res))
{
- if (TREE_CODE (res) != STATEMENT_LIST)
- SET_EXPR_LOCATION (res, input_location);
-
/* Add the new statement to the block. */
gfc_add_expr_to_block (&block, res);
}
yields (at least) the following regressions:
FAIL: gfortran.dg/gomp/appendix-a/a.24.1.f90 -O (test for errors, line 20)
FAIL: gfortran.dg/gomp/appendix-a/a.24.1.f90 -O (test for errors, line 14)
FAIL: gfortran.dg/gomp/appendix-a/a.24.1.f90 -O (test for errors, line 20)
FAIL: gfortran.dg/gomp/appendix-a/a.24.1.f90 -O (test for excess errors)
FAIL: gfortran.dg/gomp/appendix-a/a.35.1.f90 -O (test for warnings, line 13)
FAIL: gfortran.dg/gomp/appendix-a/a.35.1.f90 -O (test for excess errors)
FAIL: gfortran.dg/gomp/appendix-a/a.35.3.f90 -O (test for warnings, line 10)
FAIL: gfortran.dg/gomp/appendix-a/a.35.3.f90 -O (test for excess errors)
FAIL: gfortran.dg/gomp/appendix-a/a.35.4.f90 -O (test for warnings, line 11)
FAIL: gfortran.dg/gomp/appendix-a/a.35.4.f90 -O (test for excess errors)
FAIL: gfortran.dg/gomp/appendix-a/a.35.6.f90 -O (test for warnings, line 9)
FAIL: gfortran.dg/gomp/appendix-a/a.35.6.f90 -O (test for excess errors)
FAIL: gfortran.dg/gomp/block-1.f90 -O (test for errors, line 5)
FAIL: gfortran.dg/gomp/block-1.f90 -O (test for excess errors)
FAIL: gfortran.dg/gomp/crayptr3.f90 -O (test for errors, line 19)
FAIL: gfortran.dg/gomp/crayptr3.f90 -O (test for errors, line 20)
FAIL: gfortran.dg/gomp/crayptr3.f90 -O (test for excess errors)
FAIL: gfortran.dg/gomp/pr33439.f90 -O (test for errors, line 8)
FAIL: gfortran.dg/gomp/pr33439.f90 -O (test for errors, line 10)
FAIL: gfortran.dg/gomp/pr33439.f90 -O (test for errors, line 21)
FAIL: gfortran.dg/gomp/pr33439.f90 -O (test for errors, line 22)
FAIL: gfortran.dg/gomp/pr33439.f90 -O (test for errors, line 33)
FAIL: gfortran.dg/gomp/pr33439.f90 -O (test for excess errors)
FAIL: gfortran.dg/gomp/sharing-1.f90 -O (test for errors, line 12)
FAIL: gfortran.dg/gomp/sharing-1.f90 -O (test for errors, line 24)
FAIL: gfortran.dg/gomp/sharing-1.f90 -O (test for errors, line 25)
FAIL: gfortran.dg/gomp/sharing-1.f90 -O (test for errors, line 26)
FAIL: gfortran.dg/gomp/sharing-1.f90 -O (test for excess errors)
FAIL: gfortran.dg/gomp/sharing-2.f90 -O (test for errors, line 12)
FAIL: gfortran.dg/gomp/sharing-2.f90 -O (test for errors, line 16)
FAIL: gfortran.dg/gomp/sharing-2.f90 -O (test for errors, line 57)
FAIL: gfortran.dg/gomp/sharing-2.f90 -O (test for errors, line 58)
FAIL: gfortran.dg/gomp/sharing-2.f90 -O (test for errors, line 64)
FAIL: gfortran.dg/gomp/sharing-2.f90 -O (test for errors, line 65)
FAIL: gfortran.dg/gomp/sharing-2.f90 -O (test for excess errors)
FAIL: gfortran.dg/gomp/sharing-3.f90 -O (test for errors, line 28)
FAIL: gfortran.dg/gomp/sharing-3.f90 -O (test for errors, line 30)
FAIL: gfortran.dg/gomp/sharing-3.f90 -O (test for errors, line 33)
FAIL: gfortran.dg/gomp/sharing-3.f90 -O (test for errors, line 34)
FAIL: gfortran.dg/gomp/sharing-3.f90 -O (test for excess errors)
One should find out for which kind of statements the SET_EXPR_LOCATION is
actually needed, and fix those in an appropriate way.
--
Summary: [Cleanup] Remove SET_EXPR_LOCATION in gfc_trans_code
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: janus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41827
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/41827] [Cleanup] Remove SET_EXPR_LOCATION in gfc_trans_code
2009-10-26 9:27 [Bug fortran/41827] New: [Cleanup] Remove SET_EXPR_LOCATION in gfc_trans_code janus at gcc dot gnu dot org
@ 2009-11-17 11:48 ` janus at gcc dot gnu dot org
2010-04-30 21:54 ` dfranke at gcc dot gnu dot org
1 sibling, 0 replies; 5+ messages in thread
From: janus at gcc dot gnu dot org @ 2009-11-17 11:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from janus at gcc dot gnu dot org 2009-11-17 11:47 -------
Since all regressions are OpenMP related, the following patch works without any
testsuite failures:
Index: gcc/fortran/trans.c
===================================================================
--- gcc/fortran/trans.c (revision 154189)
+++ gcc/fortran/trans.c (working copy)
@@ -1281,7 +1281,7 @@ gfc_trans_code (gfc_code * code)
if (res != NULL_TREE && ! IS_EMPTY_STMT (res))
{
- if (TREE_CODE (res) != STATEMENT_LIST)
+ if (TREE_CODE (res) != STATEMENT_LIST && gfc_option.flag_openmp)
SET_EXPR_LOCATION (res, input_location);
/* Add the new statement to the block. */
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41827
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/41827] [Cleanup] Remove SET_EXPR_LOCATION in gfc_trans_code
2009-10-26 9:27 [Bug fortran/41827] New: [Cleanup] Remove SET_EXPR_LOCATION in gfc_trans_code janus at gcc dot gnu dot org
2009-11-17 11:48 ` [Bug fortran/41827] " janus at gcc dot gnu dot org
@ 2010-04-30 21:54 ` dfranke at gcc dot gnu dot org
1 sibling, 0 replies; 5+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-04-30 21:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from dfranke at gcc dot gnu dot org 2010-04-30 21:54 -------
See PR41359 for another use of SET_EXPR_LOCATION.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41827
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/41827] [Cleanup] Remove SET_EXPR_LOCATION in gfc_trans_code
[not found] <bug-41827-4@http.gcc.gnu.org/bugzilla/>
2013-06-15 11:04 ` dominiq at lps dot ens.fr
@ 2013-06-16 18:06 ` dominiq at lps dot ens.fr
1 sibling, 0 replies; 5+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-06-16 18:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41827
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2013-06-16
Ever confirmed|0 |1
--- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Moving to waiting.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/41827] [Cleanup] Remove SET_EXPR_LOCATION in gfc_trans_code
[not found] <bug-41827-4@http.gcc.gnu.org/bugzilla/>
@ 2013-06-15 11:04 ` dominiq at lps dot ens.fr
2013-06-16 18:06 ` dominiq at lps dot ens.fr
1 sibling, 0 replies; 5+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-06-15 11:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41827
--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Is this PR another WONTFIX?
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-06-16 18:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-26 9:27 [Bug fortran/41827] New: [Cleanup] Remove SET_EXPR_LOCATION in gfc_trans_code janus at gcc dot gnu dot org
2009-11-17 11:48 ` [Bug fortran/41827] " janus at gcc dot gnu dot org
2010-04-30 21:54 ` dfranke at gcc dot gnu dot org
[not found] <bug-41827-4@http.gcc.gnu.org/bugzilla/>
2013-06-15 11:04 ` dominiq at lps dot ens.fr
2013-06-16 18:06 ` 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).