public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug fortran/55197] New: Use statement for omp_lib causes ICE @ 2012-11-03 22:49 eh.toussaint at gmail dot com 2012-11-03 23:28 ` [Bug fortran/55197] " burnus at gcc dot gnu.org ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: eh.toussaint at gmail dot com @ 2012-11-03 22:49 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55197 Bug #: 55197 Summary: Use statement for omp_lib causes ICE Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned@gcc.gnu.org ReportedBy: eh.toussaint@gmail.com The following short program causes an ICE in (MinGW) gfortran 4.7.0. use, intrinsic :: omp_lib, only: omp_get_num_threads end $ gfortran -c -fopenmp tmp.f90 tmp.f90:1:0: internal compiler error: in gfc_trans_use_stmts, at fortran/trans-d ecl.c:4133 Both the 'intrinsic' attribute and the 'only' clause are required to trip the error. $ gcc -v Using built-in specs. COLLECT_GCC=E:\mingw\bin\gcc.exe COLLECT_LTO_WRAPPER=e:/mingw/bin/../libexec/gcc/mingw32/4.7.0/lto-wrapper.exe Target: mingw32 Configured with: ../gcc-4.7.0/configure --enable-languages=c,c++,ada,fortran,obj c,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgo mp --disable-win32-registry --enable-libstdcxx-debug --disable-build-poststage1- with-cxx --enable-version-specific-runtime-libs --build=mingw32 --prefix=/mingw Thread model: win32 gcc version 4.7.0 (GCC) ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/55197] Use statement for omp_lib causes ICE 2012-11-03 22:49 [Bug fortran/55197] New: Use statement for omp_lib causes ICE eh.toussaint at gmail dot com @ 2012-11-03 23:28 ` burnus at gcc dot gnu.org 2012-12-16 14:37 ` burnus at gcc dot gnu.org 2012-12-16 14:38 ` burnus at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: burnus at gcc dot gnu.org @ 2012-11-03 23:28 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55197 Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-on-valid-code Status|UNCONFIRMED |NEW Last reconfirmed| |2012-11-03 CC| |burnus at gcc dot gnu.org Ever Confirmed|0 |1 --- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-11-03 23:28:00 UTC --- Confirmed. The problem is that we do in module.c's gfc_use_modules: gfc_use_module (module_list); if (module_list->intrinsic) free_rename (module_list->rename); But then in trans-decl.c's gfc_trans_use_stmts: for (rent = use_stmt->rename; rent; rent = rent->next) While freeing the memory is probably fine for build-in intrinsic modules like ISO_Fortran_env and ISO_C_Binding; however, doing so for intrinsic modules which are loaded for a file is wrong. (Side note: We should free the rename list in trans-decl.c to avoid mem leaks.) ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/55197] Use statement for omp_lib causes ICE 2012-11-03 22:49 [Bug fortran/55197] New: Use statement for omp_lib causes ICE eh.toussaint at gmail dot com 2012-11-03 23:28 ` [Bug fortran/55197] " burnus at gcc dot gnu.org @ 2012-12-16 14:37 ` burnus at gcc dot gnu.org 2012-12-16 14:38 ` burnus at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: burnus at gcc dot gnu.org @ 2012-12-16 14:37 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55197 --- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-12-16 14:36:58 UTC --- Author: burnus Date: Sun Dec 16 14:36:54 2012 New Revision: 194537 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194537 Log: 2012-12-16 Tobias Burnus <burnus@net-b.de> PR fortran/55197 * module.c (gfc_use_module): Free rename list only for internally generated intrinsic modules. 2012-12-16 Tobias Burnus <burnus@net-b.de> PR fortran/55197 * gfortran.dg/gomp/use_intrinsic_1.f90: New. Added: trunk/gcc/testsuite/gfortran.dg/gomp/use_intrinsic_1.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/module.c trunk/gcc/testsuite/ChangeLog ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/55197] Use statement for omp_lib causes ICE 2012-11-03 22:49 [Bug fortran/55197] New: Use statement for omp_lib causes ICE eh.toussaint at gmail dot com 2012-11-03 23:28 ` [Bug fortran/55197] " burnus at gcc dot gnu.org 2012-12-16 14:37 ` burnus at gcc dot gnu.org @ 2012-12-16 14:38 ` burnus at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: burnus at gcc dot gnu.org @ 2012-12-16 14:38 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55197 Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-12-16 14:38:34 UTC --- FIXED for GCC 4.8 (trunk). Thanks for the bugreport! ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-12-16 14:38 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2012-11-03 22:49 [Bug fortran/55197] New: Use statement for omp_lib causes ICE eh.toussaint at gmail dot com 2012-11-03 23:28 ` [Bug fortran/55197] " burnus at gcc dot gnu.org 2012-12-16 14:37 ` burnus at gcc dot gnu.org 2012-12-16 14:38 ` burnus 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).