From: Jakub Jelinek <jakub@redhat.com>
To: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org
Subject: [PATCH] Fix fallout of the 4.5 fortran locus changes (PR fortran/45344)
Date: Fri, 20 Aug 2010 09:49:00 -0000 [thread overview]
Message-ID: <20100820084317.GA702@tyan-ft48-01.lab.bos.redhat.com> (raw)
Hi!
I've backported a patch from trunk to fix a locus problem exhibited by
my recent patch. Committed to 4.5 after testing on i686-linux.
2010-08-20 Jakub Jelinek <jakub@redhat.com>
PR fortran/45344
Backport from mainline
2010-05-14 Jakub Jelinek <jakub@redhat.com>
* trans.c (trans_code): Set backend locus early.
* trans-decl.c (gfc_get_fake_result_decl): Use source location
of the function instead of current input_location.
* gfortran.dg/gomp/pr44036-1.f90: Adjust.
--- gcc/fortran/trans.c.jj 2010-08-17 08:52:00.000000000 +0200
+++ gcc/fortran/trans.c 2010-08-20 09:48:32.399813724 +0200
@@ -1090,6 +1090,8 @@ trans_code (gfc_code * code, tree cond)
gfc_add_expr_to_block (&block, res);
}
+ gfc_set_backend_locus (&code->loc);
+
switch (code->op)
{
case EXEC_NOP:
--- gcc/fortran/trans-decl.c.jj 2010-06-11 11:04:35.000000000 +0200
+++ gcc/fortran/trans-decl.c 2010-08-20 10:27:17.418795620 +0200
@@ -2252,11 +2252,11 @@ gfc_get_fake_result_decl (gfc_symbol * s
IDENTIFIER_POINTER (DECL_NAME (this_function_decl)));
if (!sym->attr.mixed_entry_master && sym->attr.function)
- decl = build_decl (input_location,
+ decl = build_decl (DECL_SOURCE_LOCATION (this_function_decl),
VAR_DECL, get_identifier (name),
gfc_sym_type (sym));
else
- decl = build_decl (input_location,
+ decl = build_decl (DECL_SOURCE_LOCATION (this_function_decl),
VAR_DECL, get_identifier (name),
TREE_TYPE (TREE_TYPE (this_function_decl)));
DECL_ARTIFICIAL (decl) = 1;
--- gcc/testsuite/gfortran.dg/gomp/pr44036-1.f90.jj 2010-06-11 11:02:45.966395710 +0200
+++ gcc/testsuite/gfortran.dg/gomp/pr44036-1.f90 2010-08-20 10:08:51.500782354 +0200
@@ -12,7 +12,7 @@ subroutine foo(a, b)
x = a(4)
!$omp end parallel
!$omp parallel default(none) private (x) ! { dg-error "enclosing parallel" }
- x = b(5) ! { dg-error "not specified in" "" { target *-*-* } 11 }
+ x = b(5) ! { dg-error "not specified in" }
!$omp end parallel
!$omp parallel default(none) private (x)
x = c(6)
Jakub
reply other threads:[~2010-08-20 8:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100820084317.GA702@tyan-ft48-01.lab.bos.redhat.com \
--to=jakub@redhat.com \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).