public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/17091] New: gfortran MAIN__ symbol not marked TREE_PUBLIC
@ 2004-08-19 4:18 dje at gcc dot gnu dot org
2004-08-19 4:33 ` [Bug fortran/17091] " dje at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: dje at gcc dot gnu dot org @ 2004-08-19 4:18 UTC (permalink / raw)
To: gcc-bugs
When gfortran synthesizes the MAIN__ symbol, the decl is not receiving the
attribute TREE_PUBLIC, which is causing problems on AIX because the symbol is
not being globalized.
(gdb) break assemble_start_function
Breakpoint 5 at 0x10103808: file /farm/dje/src/src/gcc/varasm.c, line 1184.
(gdb) run foo.f90
MAIN__
Breakpoint 5, assemble_start_function (decl=0x3005f380,
fnname=0x200c4855 "MAIN__") at /farm/dje/src/src/gcc/varasm.c:1184
(gdb) print decl->common.public_flag
$2 = 0
--
Summary: gfortran MAIN__ symbol not marked TREE_PUBLIC
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dje at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: powerpc-ibm-aix5.2.0.0
GCC host triplet: powerpc-ibm-aix5.2.0.0
GCC target triplet: powerpc-ibm-aix5.2.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17091
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/17091] gfortran MAIN__ symbol not marked TREE_PUBLIC
2004-08-19 4:18 [Bug fortran/17091] New: gfortran MAIN__ symbol not marked TREE_PUBLIC dje at gcc dot gnu dot org
@ 2004-08-19 4:33 ` dje at gcc dot gnu dot org
2004-08-19 4:39 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: dje at gcc dot gnu dot org @ 2004-08-19 4:33 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dje at gcc dot gnu dot org 2004-08-19 04:33 -------
BTW, I don't know the cause, but adding the "-v" verbose flag causes the symbol
to become public:
(gdb) run -v foo.f90
(gdb) print decl->common.public_flag
$3 = 1
(gdb) run foo.f90
(gdb) print decl->common.public_flag
$4 = 0
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17091
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/17091] gfortran MAIN__ symbol not marked TREE_PUBLIC
2004-08-19 4:18 [Bug fortran/17091] New: gfortran MAIN__ symbol not marked TREE_PUBLIC dje at gcc dot gnu dot org
2004-08-19 4:33 ` [Bug fortran/17091] " dje at gcc dot gnu dot org
@ 2004-08-19 4:39 ` pinskia at gcc dot gnu dot org
2004-08-19 4:45 ` dje at watson dot ibm dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-19 4:39 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-08-19 04:38 -------
I cannot produce this:
(gdb) run t.f90
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /Users/apinski/src/loops-memset/gcc/objdir/gcc/f951 t.f90
MAIN__
Breakpoint 5, assemble_start_function (decl=0x4165683c, fnname=0x42808f0d "MAIN__") at /Users/
apinski/src/loops-memset/gcc/gcc/varasm.c:1184
1184 if (unlikely_text_section_name)
(gdb) p debug_tree (decl)
<function_decl 0x4165683c MAIN__
type <function_type 0x41655364
type <void_type 0x415f0d14 void VOID
align 8 symtab 0 alias set -1
pointer_to_this <pointer_type 0x415f0d90>>
SI
size <integer_cst 0x415ed760 constant invariant 32>
unit size <integer_cst 0x415ed7c0 constant invariant 4>
align 32 symtab 0 alias set -1
arg-types <tree_list 0x41650450 value <void_type 0x415f0d14 void>>>
asm_written nothrow public static SI file t.f90 line 0
result <result_decl 0x416568b8 type <void_type 0x415f0d14 void>
ignored VOID file t.f90 line 0
align 8 context <function_decl 0x4165683c MAIN__>> initial <block 0x415d3900>
(mem:SI (symbol_ref:SI ("MAIN__") [flags 0x103] <function_decl 0x4165683c MAIN__>) [0 S4 A8])
saved-insns 0x415e9800 chain <function_decl 0x41656364 _gfortran_st_set_nml_var_log>>
$4 = void
(gdb) print decl->common.public_flag
$5 = 1
(gdb)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17091
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/17091] gfortran MAIN__ symbol not marked TREE_PUBLIC
2004-08-19 4:18 [Bug fortran/17091] New: gfortran MAIN__ symbol not marked TREE_PUBLIC dje at gcc dot gnu dot org
2004-08-19 4:33 ` [Bug fortran/17091] " dje at gcc dot gnu dot org
2004-08-19 4:39 ` pinskia at gcc dot gnu dot org
@ 2004-08-19 4:45 ` dje at watson dot ibm dot com
2004-08-19 19:01 ` dje at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: dje at watson dot ibm dot com @ 2004-08-19 4:45 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dje at watson dot ibm dot com 2004-08-19 04:45 -------
Subject: Re: gfortran MAIN__ symbol not marked TREE_PUBLIC
I believe that the bug may be due to memory corruption or
uninitialized data. Note how -v (and -c) change the behavior.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17091
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/17091] gfortran MAIN__ symbol not marked TREE_PUBLIC
2004-08-19 4:18 [Bug fortran/17091] New: gfortran MAIN__ symbol not marked TREE_PUBLIC dje at gcc dot gnu dot org
` (2 preceding siblings ...)
2004-08-19 4:45 ` dje at watson dot ibm dot com
@ 2004-08-19 19:01 ` dje at gcc dot gnu dot org
2004-08-19 21:38 ` cvs-commit at gcc dot gnu dot org
2004-08-19 22:03 ` pinskia at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: dje at gcc dot gnu dot org @ 2004-08-19 19:01 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dje at gcc dot gnu dot org 2004-08-19 19:01 -------
gcc/fortran/symbol.c:gfc_clear_attr() is missing a line to clear entry_master
attr->entry_master = 0;
The uninitialized variable assumes random values on AIX, causing the symptom of
symbols not being marked TREE_PUBLIC and not being globalized.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pbrook at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-08-19 19:01:07
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17091
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/17091] gfortran MAIN__ symbol not marked TREE_PUBLIC
2004-08-19 4:18 [Bug fortran/17091] New: gfortran MAIN__ symbol not marked TREE_PUBLIC dje at gcc dot gnu dot org
` (3 preceding siblings ...)
2004-08-19 19:01 ` dje at gcc dot gnu dot org
@ 2004-08-19 21:38 ` cvs-commit at gcc dot gnu dot org
2004-08-19 22:03 ` pinskia at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-08-19 21:38 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-08-19 21:38 -------
Subject: Bug 17091
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: pbrook@gcc.gnu.org 2004-08-19 21:37:58
Modified files:
gcc/fortran : ChangeLog gfortran.h symbol.c
Log message:
PR fortran/17091
* gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
* symbol.c (gfc_clear_attr): Use memset.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.155&r2=1.156
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/gfortran.h.diff?cvsroot=gcc&r1=1.24&r2=1.25
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/symbol.c.diff?cvsroot=gcc&r1=1.12&r2=1.13
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17091
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/17091] gfortran MAIN__ symbol not marked TREE_PUBLIC
2004-08-19 4:18 [Bug fortran/17091] New: gfortran MAIN__ symbol not marked TREE_PUBLIC dje at gcc dot gnu dot org
` (4 preceding siblings ...)
2004-08-19 21:38 ` cvs-commit at gcc dot gnu dot org
@ 2004-08-19 22:03 ` pinskia at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-19 22:03 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-08-19 22:03 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |3.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17091
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-08-19 22:03 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-19 4:18 [Bug fortran/17091] New: gfortran MAIN__ symbol not marked TREE_PUBLIC dje at gcc dot gnu dot org
2004-08-19 4:33 ` [Bug fortran/17091] " dje at gcc dot gnu dot org
2004-08-19 4:39 ` pinskia at gcc dot gnu dot org
2004-08-19 4:45 ` dje at watson dot ibm dot com
2004-08-19 19:01 ` dje at gcc dot gnu dot org
2004-08-19 21:38 ` cvs-commit at gcc dot gnu dot org
2004-08-19 22:03 ` pinskia at gcc dot gnu dot 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).