public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/20361] New: -fmax-stack-var-size=N not working for equivalence
@ 2005-03-07 16:33 paulthomas2 at wanadoo dot fr
2005-03-07 16:35 ` [Bug fortran/20361] " pinskia at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: paulthomas2 at wanadoo dot fr @ 2005-03-07 16:33 UTC (permalink / raw)
To: gcc-bugs
The enclosed example causes a segmentation fault at runtime under Cygwin.
Reducing the length of pool1 by 1 allows it to run. This length looks like
2^18 less a header block so paging/memory/stack was suspected. Note this does
not occur in Linux or native Windows versions of gfortran.
Setting -fmax-stack-var-size appropriately makes no difference but
d:/irun/bin/gfortran -Wl,--stack=2100000 fixes the problem.
-fmax-stack-var-size seems to work for non-equivalence variables but is broken
for equivalenced variables - see correspondence on the list between myself and
A.Pinskia dated 6-7 March 2005 under the subject: Re: Equivalence segfault in
TEST_FPU.F90
Test programme and output:
__________________________
program test_equivalence
real*8 :: pool1(260105),pool2(1)
equivalence (pool1,pool2)
end program test_equivalence
$ d:/irun/bin/gfortran -v test_prequi.f90
Driving: d:/irun/bin/gfortran -v test_prequi.f90 -lgfortranbegin -lgfortran
Using built-in specs.
Configured with: ../gcc/configure --with-mpfr=/gmp-gcc4 --with-gmp=/gmp-gcc4 -en
able-languages=c,f95 --prefix=/cygdrive/d/irun
Thread model: single
gcc version 4.0.0 20050129 (experimental)
/cygdrive/d/irun/libexec/gcc/i686-pc-cygwin/4.0.0/f951.exe test_prequi.f90 -qui
et -dumpbase test_prequi.f90 -mtune=pentiumpro -auxbase test_prequi -version -o
/cygdrive/c/DOCUME~1/PAULTH~1/LOCALS~1/Temp/cc1r1KUq.s
GNU F95 version 4.0.0 20050209 (experimental) (i686-pc-cygwin)
compiled by GNU C version 4.0.0 20050131 (experimental).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
as -o /cygdrive/c/DOCUME~1/PAULTH~1/LOCALS~1/Temp/ccK4DcrJ.o /cygdrive/c/DOCUME
~1/PAULTH~1/LOCALS~1/Temp/cc1r1KUq.s
/cygdrive/d/irun/libexec/gcc/i686-pc-cygwin/4.0.0/collect2.exe -Bdynamic --dll-
search-prefix=cyg /lib/crt0.o -L/cygdrive/d/irun/lib/gcc/i686-pc-cygwin/4.0.0 -L
/cygdrive/d/irun/lib/gcc/i686-pc-cygwin/4.0.0/../../.. /cygdrive/c/DOCUME~1/PAUL
TH~1/LOCALS~1/Temp/ccK4DcrJ.o -lgfortranbegin -lgfortran -lgcc -lcygwin -luser32
-lkernel32 -ladvapi32 -lshell32 -lgcc
PaulThomas@Paul /cygdrive/d/gfortran
$ ./a
Segmentation fault (core dumped)
--
Summary: -fmax-stack-var-size=N not working for equivalence
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: paulthomas2 at wanadoo dot fr
CC: gcc-bugs at gcc dot gnu dot org,pinskia at physics dot
uc dot edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20361
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/20361] -fmax-stack-var-size=N not working for equivalence
2005-03-07 16:33 [Bug fortran/20361] New: -fmax-stack-var-size=N not working for equivalence paulthomas2 at wanadoo dot fr
@ 2005-03-07 16:35 ` pinskia at gcc dot gnu dot org
2005-03-10 14:34 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-07 16:35 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-07 16:35 -------
Just I note, my last name is Pinski, not Pinskia, the a is for my first name.
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
CC|pinskia at physics dot uc |pinskia at gcc dot gnu dot
|dot edu |org
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |wrong-code
Last reconfirmed|0000-00-00 00:00:00 |2005-03-07 16:35:24
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20361
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/20361] -fmax-stack-var-size=N not working for equivalence
2005-03-07 16:33 [Bug fortran/20361] New: -fmax-stack-var-size=N not working for equivalence paulthomas2 at wanadoo dot fr
2005-03-07 16:35 ` [Bug fortran/20361] " pinskia at gcc dot gnu dot org
@ 2005-03-10 14:34 ` pinskia at gcc dot gnu dot org
2005-03-12 0:39 ` tobi at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-10 14:34 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |20405
nThis| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20361
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/20361] -fmax-stack-var-size=N not working for equivalence
2005-03-07 16:33 [Bug fortran/20361] New: -fmax-stack-var-size=N not working for equivalence paulthomas2 at wanadoo dot fr
2005-03-07 16:35 ` [Bug fortran/20361] " pinskia at gcc dot gnu dot org
2005-03-10 14:34 ` pinskia at gcc dot gnu dot org
@ 2005-03-12 0:39 ` tobi at gcc dot gnu dot org
2005-03-12 21:44 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-03-12 0:39 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |tobi at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2005-03-07 16:35:24 |2005-03-12 00:39:45
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20361
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/20361] -fmax-stack-var-size=N not working for equivalence
2005-03-07 16:33 [Bug fortran/20361] New: -fmax-stack-var-size=N not working for equivalence paulthomas2 at wanadoo dot fr
` (2 preceding siblings ...)
2005-03-12 0:39 ` tobi at gcc dot gnu dot org
@ 2005-03-12 21:44 ` cvs-commit at gcc dot gnu dot org
2005-03-12 21:51 ` cvs-commit at gcc dot gnu dot org
2005-03-12 21:56 ` tobi at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-03-12 21:44 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-03-12 21:44 -------
Subject: Bug 20361
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: tobi@gcc.gnu.org 2005-03-12 21:44:44
Modified files:
gcc/fortran : ChangeLog trans-array.c trans-array.h
trans-common.c trans-decl.c trans.h
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gfortran.dg: largeequiv_1.f90
Log message:
fortran/
PR fortran/20361
* trans-array.c (gfc_stack_space_left): Remove unused variable.
(gfc_can_put_var_on_stack): Move to trans-decl.c, remove #if 0'ed
code.
* trans-array.h (gfc_stack_space_left, gfc_can_put_var_on_stack):
Remove declaration / prototype.
* trans-common.c (build_equiv_decl): Give union a name. Check if
it can be put on the stack.
* trans-decl.c (gfc_stack_space_left): Move function here.
(gfc_build_qualified_array): Fix comment typo.
* trans.h (gfc_put_var_on_stack): Add prototype.
testsuite/
PR fortran/20361
* gfortran.dg/largeequiv_1.f90: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.348&r2=1.349
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-array.c.diff?cvsroot=gcc&r1=1.39&r2=1.40
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-array.h.diff?cvsroot=gcc&r1=1.7&r2=1.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-common.c.diff?cvsroot=gcc&r1=1.23&r2=1.24
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-decl.c.diff?cvsroot=gcc&r1=1.54&r2=1.55
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans.h.diff?cvsroot=gcc&r1=1.23&r2=1.24
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5151&r2=1.5152
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/largeequiv_1.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20361
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/20361] -fmax-stack-var-size=N not working for equivalence
2005-03-07 16:33 [Bug fortran/20361] New: -fmax-stack-var-size=N not working for equivalence paulthomas2 at wanadoo dot fr
` (3 preceding siblings ...)
2005-03-12 21:44 ` cvs-commit at gcc dot gnu dot org
@ 2005-03-12 21:51 ` cvs-commit at gcc dot gnu dot org
2005-03-12 21:56 ` tobi at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-03-12 21:51 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-03-12 21:51 -------
Subject: Bug 20361
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-4_0-branch
Changes by: tobi@gcc.gnu.org 2005-03-12 21:50:51
Modified files:
gcc/fortran : ChangeLog trans-array.c trans-array.h
trans-common.c trans-decl.c trans.h
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gfortran.dg: largeequiv_1.f90
Log message:
fortran/
PR fortran/20361
* trans-array.c (gfc_stack_space_left): Remove unused variable.
(gfc_can_put_var_on_stack): Move to trans-decl.c, remove #if 0'ed
code.
* trans-array.h (gfc_stack_space_left, gfc_can_put_var_on_stack):
Remove declaration / prototype.
* trans-common.c (build_equiv_decl): Give union a name. Check if
it can be put on the stack.
* trans-decl.c (gfc_stack_space_left): Move function here.
(gfc_build_qualified_array): Fix comment typo.
* trans.h (gfc_put_var_on_stack): Add prototype.
testsuite/
PR fortran/20361
* gfortran.dg/largeequiv_1.f90: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.335.2.9&r2=1.335.2.10
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-array.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.39&r2=1.39.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-array.h.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.7&r2=1.7.18.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-common.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.23&r2=1.23.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-decl.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.54&r2=1.54.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans.h.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.23&r2=1.23.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.37&r2=1.5084.2.38
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/largeequiv_1.f90.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20361
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/20361] -fmax-stack-var-size=N not working for equivalence
2005-03-07 16:33 [Bug fortran/20361] New: -fmax-stack-var-size=N not working for equivalence paulthomas2 at wanadoo dot fr
` (4 preceding siblings ...)
2005-03-12 21:51 ` cvs-commit at gcc dot gnu dot org
@ 2005-03-12 21:56 ` tobi at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-03-12 21:56 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tobi at gcc dot gnu dot org 2005-03-12 21:56 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20361
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-03-12 21:56 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-07 16:33 [Bug fortran/20361] New: -fmax-stack-var-size=N not working for equivalence paulthomas2 at wanadoo dot fr
2005-03-07 16:35 ` [Bug fortran/20361] " pinskia at gcc dot gnu dot org
2005-03-10 14:34 ` pinskia at gcc dot gnu dot org
2005-03-12 0:39 ` tobi at gcc dot gnu dot org
2005-03-12 21:44 ` cvs-commit at gcc dot gnu dot org
2005-03-12 21:51 ` cvs-commit at gcc dot gnu dot org
2005-03-12 21:56 ` tobi 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).