public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/52392] New: internal compiler error occurs when compilin files separately but not when all is in one file
@ 2012-02-26 23:31 dominique.pelletier at polymtl dot ca
2012-02-27 8:12 ` [Bug fortran/52392] " burnus at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: dominique.pelletier at polymtl dot ca @ 2012-02-26 23:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52392
Bug #: 52392
Summary: internal compiler error occurs when compilin files
separately but not when all is in one file
Classification: Unclassified
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: dominique.pelletier@polymtl.ca
Created attachment 26758
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26758
contains the fortran files listed in the above bug report
Greetings,
I have encountered a very strange compiler bug with gfortran
At least it is to me. I am using gfortran 4.6.1. I used the
comman gffortran --version to get the information.
I am developing a generic finite element program using
object oriented FORTRAN 2003. Initially all sources were
in one file and it worked well: gfortran has no probelms
compiling the programs and its mosules. The results
from executions are corrects.
I then split the source to have one module per file plus
a file for the main program. I compiled the individual
modules in the proper sequence but gfortran generated an
internal compiler error message for one of the modules.
I got the following message from gfortran:
[dp@C4079-13VM1 tests]$ gfortran -c testb_part1.f95
[dp@C4079-13VM1 tests]$ gfortran -c testb_part2.f95
testb_part2.f95: In function ‘link_wf_to_zones’:
testb_part2.f95:66:0: internal compiler error: in fold_convert_loc, at
fold-const.c:1906
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
I did my best to reproduce the bug on the
simplest example possible. Enclosed are four files
That i compiled on my Lenovo W520 running Linux Fedora 15, inside
VMWare under Windows & enterprise 64 bit version.
testa.f03 : it contains the source that compiles properly
and executes correctly. I compiled it with
gfortran testa.f03 -o testa.exe
and executed it with
./testa.exe
testb_part1.f03 and testb_part2.f03 : are obtained by splitting
testa.f03 . I normaly compile them as follows:
gfortran - c testb_part1.f03
gfortran - c testb_part2.f03
gfortran testb_part1.o testb_part2.o -o testb.exe
and got the above internal compiler error message when compiling
testb_part2.f03
testc.f03 : I merged the two files testb_part1.f03 and testb_part2.f03
to ensure that i had not introduced any changes when
I split the original source file into two. I performed
a diff on testa.f03 and testc.f03 to make sure
that the two files are identical. I compiled with
gfortran testc.f03 -o testc.exe
and executed with
./testc.exe
This yields results that are identical to those obtained
with testa.f03
The problem seems to occur when I invoke the pointer-vallued
function 'get_ptr_to_zone(zone_name), from the module zones_class.
The argument 'zone_name' is a character(len=20) variable. and
the function 'get_ptr_to zone' is of type 'zone_type'.
Another very similar function 'get_zone_index' is identical
to 'get_ptr_to_zone' except that it returns an index in a vector
of type 'zone_type' instead of a pointer and that it causes
no internal compiler error message.
I thank you in advance for your attention.
Please advise me as how best to proceed with this situation.
Putting all modules in one source file seems to be a viable work-around
for the short term. I expect that the Fortran 2003 source will grow
quickly enough that keeping all modules in a single source file
will become a hindrance in the near furure. Maybe it is possible to
extend the viability of this approach by identifying which modules
or parts of the source must be in the same source file to avoid
the compiler bug ?
Finally, I would like to know if my limited experience with
fortran 2003, could be the root of my problem? Could I be
trying things that are so twisted that gfortran gets into trouble?
I thoroughly enjoy working with gfortran, and I hope that
the bug that I am reporting is genuine and not a 'userproblem'.
I look forward to your response .
Sincerely,
Dominique Pelletier
Professor and Canada Research Chair
Mechanical engineering department
Ecole Polytechnique de Montreal
Dominique.Pelletier@polymtl.ca
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/52392] internal compiler error occurs when compilin files separately but not when all is in one file
2012-02-26 23:31 [Bug fortran/52392] New: internal compiler error occurs when compilin files separately but not when all is in one file dominique.pelletier at polymtl dot ca
@ 2012-02-27 8:12 ` burnus at gcc dot gnu.org
2013-06-11 18:58 ` dominiq at lps dot ens.fr
2013-06-11 19:20 ` mikael at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-02-27 8:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52392
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-02-27 08:07:38 UTC ---
Seems to work on CentOS release 5.7 (x86-64) with
GCC 4.7.0 20120224 (experimental) [trunk revision 184540]
(That's a --enable-checking=release build.)
I think Fedora 15 has some early GCC 4.6.0 version. (I can currently not check
whether the latest 4.6 version still shows this issue.)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/52392] internal compiler error occurs when compilin files separately but not when all is in one file
2012-02-26 23:31 [Bug fortran/52392] New: internal compiler error occurs when compilin files separately but not when all is in one file dominique.pelletier at polymtl dot ca
2012-02-27 8:12 ` [Bug fortran/52392] " burnus at gcc dot gnu.org
@ 2013-06-11 18:58 ` dominiq at lps dot ens.fr
2013-06-11 19:20 ` mikael at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-06-11 18:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52392
--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
It seems to have been fixed at revision 171654. It works with 4.7.3, 4.8.1, and
trunk. The 4.6 version is no longer supported. I think this PR could be closed
as fixed.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/52392] internal compiler error occurs when compilin files separately but not when all is in one file
2012-02-26 23:31 [Bug fortran/52392] New: internal compiler error occurs when compilin files separately but not when all is in one file dominique.pelletier at polymtl dot ca
2012-02-27 8:12 ` [Bug fortran/52392] " burnus at gcc dot gnu.org
2013-06-11 18:58 ` dominiq at lps dot ens.fr
@ 2013-06-11 19:20 ` mikael at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: mikael at gcc dot gnu.org @ 2013-06-11 19:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52392
Mikael Morin <mikael at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |mikael at gcc dot gnu.org
Known to work| |4.7.3, 4.8.1, 4.9.0
Resolution|--- |FIXED
--- Comment #3 from Mikael Morin <mikael at gcc dot gnu.org> ---
(In reply to Dominique d'Humieres from comment #2)
> It seems to have been fixed at revision 171654. It works with 4.7.3, 4.8.1,
> and trunk. The 4.6 version is no longer supported. I think this PR could be
> closed as fixed.
Closing then.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-06-11 19:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-26 23:31 [Bug fortran/52392] New: internal compiler error occurs when compilin files separately but not when all is in one file dominique.pelletier at polymtl dot ca
2012-02-27 8:12 ` [Bug fortran/52392] " burnus at gcc dot gnu.org
2013-06-11 18:58 ` dominiq at lps dot ens.fr
2013-06-11 19:20 ` mikael 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).