public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/55868] New: gfortran generates for CLASS(*) __m_MOD___vtab__$tar on NO_DOLLAR_IN_LABEL systems
@ 2013-01-03 17:28 burnus at gcc dot gnu.org
2013-01-07 14:00 ` [Bug fortran/55868] [4.8 Regression] " burnus at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-01-03 17:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55868
Bug #: 55868
Summary: gfortran generates for CLASS(*) __m_MOD___vtab__$tar
on NO_DOLLAR_IN_LABEL systems
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: critical
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: burnus@gcc.gnu.org
CC: pault@gcc.gnu.org
The program below yields the following symbols, the first one is invalid if
NO_DOLLAR_IN_LABEL is defined for the target
0000000000000000 R __m_MOD___vtab__$tar
0000000000000000 D __m_MOD_x
module m
class(*), pointer :: x => null()
end module m
Consider using GFC_PREFIX instead or ensure otherwise that the symbol does not
appear in the object file. (Names with $ are fine if they only appear as local
variables.)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/55868] [4.8 Regression] gfortran generates for CLASS(*) __m_MOD___vtab__$tar on NO_DOLLAR_IN_LABEL systems
2013-01-03 17:28 [Bug fortran/55868] New: gfortran generates for CLASS(*) __m_MOD___vtab__$tar on NO_DOLLAR_IN_LABEL systems burnus at gcc dot gnu.org
@ 2013-01-07 14:00 ` burnus at gcc dot gnu.org
2013-01-08 9:13 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-01-07 14:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55868
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
Target Milestone|--- |4.8.0
Summary|gfortran generates for |[4.8 Regression] gfortran
|CLASS(*) |generates for CLASS(*)
|__m_MOD___vtab__$tar on |__m_MOD___vtab__$tar on
|NO_DOLLAR_IN_LABEL systems |NO_DOLLAR_IN_LABEL systems
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-01-07 14:00:22 UTC ---
Mark as regression to ensure it is fixed before the 4.8 release
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/55868] [4.8 Regression] gfortran generates for CLASS(*) __m_MOD___vtab__$tar on NO_DOLLAR_IN_LABEL systems
2013-01-03 17:28 [Bug fortran/55868] New: gfortran generates for CLASS(*) __m_MOD___vtab__$tar on NO_DOLLAR_IN_LABEL systems burnus at gcc dot gnu.org
2013-01-07 14:00 ` [Bug fortran/55868] [4.8 Regression] " burnus at gcc dot gnu.org
@ 2013-01-08 9:13 ` jakub at gcc dot gnu.org
2013-01-08 9:37 ` burnus at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-01-08 9:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55868
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-08 09:13:12 UTC ---
I'd say GFC_PREFIX wouldn't improve this, I'd keep using $ unless
NO_DOLLAR_IN_LABEL, otherwise fallback to . if NO_DOT_IN_LABEL and as last
fallback use _ in this case.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/55868] [4.8 Regression] gfortran generates for CLASS(*) __m_MOD___vtab__$tar on NO_DOLLAR_IN_LABEL systems
2013-01-03 17:28 [Bug fortran/55868] New: gfortran generates for CLASS(*) __m_MOD___vtab__$tar on NO_DOLLAR_IN_LABEL systems burnus at gcc dot gnu.org
2013-01-07 14:00 ` [Bug fortran/55868] [4.8 Regression] " burnus at gcc dot gnu.org
2013-01-08 9:13 ` jakub at gcc dot gnu.org
@ 2013-01-08 9:37 ` burnus at gcc dot gnu.org
2013-01-08 9:41 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-01-08 9:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55868
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-01-08 09:37:00 UTC ---
(In reply to comment #2)
> I'd say GFC_PREFIX wouldn't improve this, I'd keep using $ unless
> NO_DOLLAR_IN_LABEL, otherwise fallback to . if NO_DOT_IN_LABEL and as last
> fallback use _ in this case.
I actually wonder whether the $ or . is really needed. The leading "__" puts it
firmly into the realm of the compiler and to avoid clashes with user-defined
types, using upper case is enough as all user-defined type names are converted
into lower case.
Hence, the following untested patch should be enough.
Another question is whether we want change at some point (e.g. ABI breaking due
to the new array descriptor?) the __vtab mangling to contains a "." (if
available) to reduce the chance of name clashes even further.
--- a/gcc/fortran/class.c
+++ b/gcc/fortran/class.c
@@ -464 +464 @@ get_unique_type_string (char *string, gfc_symbol *derived)
- sprintf (dt_name, "%s", "$tar");
+ sprintf (dt_name, "%s", "STAR");
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index 3a36cad..fef44d5 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -2769 +2769 @@ gfc_match_decl_type_spec (gfc_typespec *ts, int
implicit_flag)
- gfc_find_symbol ("$tar", gfc_current_ns, 1, &upe);
+ gfc_find_symbol ("STAR", gfc_current_ns, 1, &upe);
@@ -2772,2 +2772,2 @@ gfc_match_decl_type_spec (gfc_typespec *ts, int
- upe = gfc_new_symbol ("$tar", gfc_current_ns);
- st = gfc_new_symtree (&gfc_current_ns->sym_root, "$tar");
+ upe = gfc_new_symbol ("STAR", gfc_current_ns);
+ st = gfc_new_symtree (&gfc_current_ns->sym_root, "STAR");
@@ -2788 +2788 @@ gfc_match_decl_type_spec (gfc_typespec *ts, int
implicit_flag)
- st = gfc_find_symtree (gfc_current_ns->sym_root, "$tar");
+ st = gfc_find_symtree (gfc_current_ns->sym_root, "STAR");
@@ -2790 +2790 @@ gfc_match_decl_type_spec (gfc_typespec *ts, int
implicit_flag)
- st = gfc_new_symtree (&gfc_current_ns->sym_root, "$tar");
+ st = gfc_new_symtree (&gfc_current_ns->sym_root, "STAR");
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/55868] [4.8 Regression] gfortran generates for CLASS(*) __m_MOD___vtab__$tar on NO_DOLLAR_IN_LABEL systems
2013-01-03 17:28 [Bug fortran/55868] New: gfortran generates for CLASS(*) __m_MOD___vtab__$tar on NO_DOLLAR_IN_LABEL systems burnus at gcc dot gnu.org
` (2 preceding siblings ...)
2013-01-08 9:37 ` burnus at gcc dot gnu.org
@ 2013-01-08 9:41 ` jakub at gcc dot gnu.org
2013-01-12 12:53 ` pault at gcc dot gnu.org
2013-01-12 12:58 ` pault at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-01-08 9:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55868
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-08 09:41:29 UTC ---
Fine with me. Just a note, sprintf (dt_name, "%s", "STAR"); would be better
written as strcpy (dt_name, "STAR");
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/55868] [4.8 Regression] gfortran generates for CLASS(*) __m_MOD___vtab__$tar on NO_DOLLAR_IN_LABEL systems
2013-01-03 17:28 [Bug fortran/55868] New: gfortran generates for CLASS(*) __m_MOD___vtab__$tar on NO_DOLLAR_IN_LABEL systems burnus at gcc dot gnu.org
` (3 preceding siblings ...)
2013-01-08 9:41 ` jakub at gcc dot gnu.org
@ 2013-01-12 12:53 ` pault at gcc dot gnu.org
2013-01-12 12:58 ` pault at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu.org @ 2013-01-12 12:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55868
--- Comment #5 from Paul Thomas <pault at gcc dot gnu.org> 2013-01-12 12:52:45 UTC ---
Author: pault
Date: Sat Jan 12 12:52:41 2013
New Revision: 195124
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195124
Log:
2013-01-08 Paul Thomas <pault@gcc.gnu.org>
PR fortran/55868
* class.c (get_unique_type_string): Change $tar to STAR and
replace sprintf by strcpy where there is no formatting.
* decl.c (gfc_match_decl_type_spec): Change $tar to STAR.
2013-01-08 Paul Thomas <pault@gcc.gnu.org>
PR fortran/55868
* gfortran.dg/unlimited_polymorphic_8.f90: Update
scan-tree-dump-times for foo.0.x._vptr to deal with change from
$tar to STAR.
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/class.c
trunk/gcc/fortran/decl.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/unlimited_polymorphic_8.f90
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/55868] [4.8 Regression] gfortran generates for CLASS(*) __m_MOD___vtab__$tar on NO_DOLLAR_IN_LABEL systems
2013-01-03 17:28 [Bug fortran/55868] New: gfortran generates for CLASS(*) __m_MOD___vtab__$tar on NO_DOLLAR_IN_LABEL systems burnus at gcc dot gnu.org
` (4 preceding siblings ...)
2013-01-12 12:53 ` pault at gcc dot gnu.org
@ 2013-01-12 12:58 ` pault at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu.org @ 2013-01-12 12:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55868
Paul Thomas <pault at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
--- Comment #6 from Paul Thomas <pault at gcc dot gnu.org> 2013-01-12 12:58:39 UTC ---
Fixed on trunk.
Thanks for the report.
Paul
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-01-12 12:58 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-03 17:28 [Bug fortran/55868] New: gfortran generates for CLASS(*) __m_MOD___vtab__$tar on NO_DOLLAR_IN_LABEL systems burnus at gcc dot gnu.org
2013-01-07 14:00 ` [Bug fortran/55868] [4.8 Regression] " burnus at gcc dot gnu.org
2013-01-08 9:13 ` jakub at gcc dot gnu.org
2013-01-08 9:37 ` burnus at gcc dot gnu.org
2013-01-08 9:41 ` jakub at gcc dot gnu.org
2013-01-12 12:53 ` pault at gcc dot gnu.org
2013-01-12 12:58 ` pault at gcc dot gnu.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).