public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/56816] New: f951.exe internal compiler error. segmentation fault
@ 2013-04-02 17:48 dominique.pelletier at polymtl dot ca
  2013-04-02 17:49 ` [Bug fortran/56816] " dominique.pelletier at polymtl dot ca
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: dominique.pelletier at polymtl dot ca @ 2013-04-02 17:48 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56816

             Bug #: 56816
           Summary: f951.exe internal compiler error. segmentation fault
    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 29777
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29777
problem  occured trying to compile Metcalf example in MODERN FORTRAN EXPLAINED

DP@P-DP /cygdrive/c/users/dp/desktop/metcalf
$ gfortran -v -c myitem_list_module.f03
Using built-in specs.
COLLECT_GCC=C:\Program Files (x86)\gfortran\bin\gfortran.exe
Target: mingw32
Configured with: ../gcc-trunk/configure --prefix=/mingw
--enable-languages=c,fortran,lto --with-gmp=/home/brad/gfortran/dependencies
--disable-werror --enable-threads --enable-nls --build=i586-pc-mingw32
--enable-libgomp --enable-shared --disable-win32-registry --with-dwarf2
--disable-sjlj-exceptions --enable-lto --build=mingw32
--enable-version-specific-runtime-libs
Thread model: win32
gcc version 4.8.0 20130302 (experimental) [trunk revision 196403] (GCC)
COLLECT_GCC_OPTIONS='-v' '-c' '-mtune=i386' '-march=i386'
 c:/program files (x86)/gfortran/bin/../libexec/gcc/mingw32/4.8.0/f951.exe
myitem_list_module.f03 -quiet -dumpbase myitem_list_module.f03 -mtune=i386
-march=i386 -auxbase myitem_list_module -version -fintrinsic-modules-path
c:/program files (x86)/gfortran/bin/../lib/gcc/mingw32/4.8.0/finclude -o
C:\cygwin\tmp\cckGnVj1.s
GNU Fortran (GCC) version 4.8.0 20130302 (experimental) [trunk revision 196403]
(mingw32)
        compiled by GNU C version 4.8.0 20130302 (experimental) [trunk revision
196403], GMP version 5.0.2, MPFR version 3.1.0, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU Fortran (GCC) version 4.8.0 20130302 (experimental) [trunk revision 196403]
(mingw32)
        compiled by GNU C version 4.8.0 20130302 (experimental) [trunk revision
196403], GMP version 5.0.2, MPFR version 3.1.0, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
f951.exe: internal compiler error: Segmentation fault
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug fortran/56816] f951.exe internal compiler error. segmentation fault
  2013-04-02 17:48 [Bug fortran/56816] New: f951.exe internal compiler error. segmentation fault dominique.pelletier at polymtl dot ca
@ 2013-04-02 17:49 ` dominique.pelletier at polymtl dot ca
  2013-04-02 17:59 ` Joost.VandeVondele at mat dot ethz.ch
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: dominique.pelletier at polymtl dot ca @ 2013-04-02 17:49 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56816

Dominique Pelletier <dominique.pelletier at polymtl dot ca> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|unknown                     |4.8.0

--- Comment #1 from Dominique Pelletier <dominique.pelletier at polymtl dot ca> 2013-04-02 17:49:18 UTC ---

DP@P-DP /cygdrive/c/users/dp/desktop/metcalf
$ gfortran -v -c myitem_list_module.f03
Using built-in specs.
COLLECT_GCC=C:\Program Files (x86)\gfortran\bin\gfortran.exe
Target: mingw32
Configured with: ../gcc-trunk/configure --prefix=/mingw
--enable-languages=c,fortran,lto --with-gmp=/home/brad/gfortran/dependencies
--disable-werror --enable-threads --enable-nls --build=i586-pc-mingw32
--enable-libgomp --enable-shared --disable-win32-registry --with-dwarf2
--disable-sjlj-exceptions --enable-lto --build=mingw32
--enable-version-specific-runtime-libs
Thread model: win32
gcc version 4.8.0 20130302 (experimental) [trunk revision 196403] (GCC)
COLLECT_GCC_OPTIONS='-v' '-c' '-mtune=i386' '-march=i386'
 c:/program files (x86)/gfortran/bin/../libexec/gcc/mingw32/4.8.0/f951.exe
myitem_list_module.f03 -quiet -dumpbase myitem_list_module.f03 -mtune=i386
-march=i386 -auxbase myitem_list_module -version -fintrinsic-modules-path
c:/program files (x86)/gfortran/bin/../lib/gcc/mingw32/4.8.0/finclude -o
C:\cygwin\tmp\cckGnVj1.s
GNU Fortran (GCC) version 4.8.0 20130302 (experimental) [trunk revision 196403]
(mingw32)
        compiled by GNU C version 4.8.0 20130302 (experimental) [trunk revision
196403], GMP version 5.0.2, MPFR version 3.1.0, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU Fortran (GCC) version 4.8.0 20130302 (experimental) [trunk revision 196403]
(mingw32)
        compiled by GNU C version 4.8.0 20130302 (experimental) [trunk revision
196403], GMP version 5.0.2, MPFR version 3.1.0, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
f951.exe: internal compiler error: Segmentation fault
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug fortran/56816] f951.exe internal compiler error. segmentation fault
  2013-04-02 17:48 [Bug fortran/56816] New: f951.exe internal compiler error. segmentation fault dominique.pelletier at polymtl dot ca
  2013-04-02 17:49 ` [Bug fortran/56816] " dominique.pelletier at polymtl dot ca
@ 2013-04-02 17:59 ` Joost.VandeVondele at mat dot ethz.ch
  2013-04-02 19:02 ` dominique.pelletier at polymtl dot ca
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2013-04-02 17:59 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56816

Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Joost.VandeVondele at mat
                   |                            |dot ethz.ch

--- Comment #2 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> 2013-04-02 17:59:28 UTC ---
you'll need to provide also the sources of the files that define the modules,
otherwise we get:

bug.f90:3.8:

    use any_list_module
        1
Fatal Error: Can't open module file 'any_list_module.mod' for reading at (1):
No such file or directory


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug fortran/56816] f951.exe internal compiler error. segmentation fault
  2013-04-02 17:48 [Bug fortran/56816] New: f951.exe internal compiler error. segmentation fault dominique.pelletier at polymtl dot ca
                   ` (2 preceding siblings ...)
  2013-04-02 19:02 ` dominique.pelletier at polymtl dot ca
@ 2013-04-02 19:02 ` dominique.pelletier at polymtl dot ca
  2013-04-02 20:41 ` [Bug fortran/56816] ICE in delete_root tkoenig at gcc dot gnu.org
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: dominique.pelletier at polymtl dot ca @ 2013-04-02 19:02 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56816

--- Comment #4 from Dominique Pelletier <dominique.pelletier at polymtl dot ca> 2013-04-02 19:02:36 UTC ---
DP@P-DP /cygdrive/c/users/dp/Desktop/metcalf
$ gfortran -v -c bug_report.f03
Using built-in specs.
COLLECT_GCC=C:\Program Files (x86)\gfortran\bin\gfortran.exe
Target: mingw32
Configured with: ../gcc-trunk/configure --prefix=/mingw
--enable-languages=c,fortran,lto --with-gmp=/home/brad/gfortran/dependencies
--disable-werror --enable-threads --enable-nls --build=i586-pc-mingw32
--enable-libgomp --enable-shared --disable-win32-registry --with-dwarf2
--disable-sjlj-exceptions --enable-lto --build=mingw32
--enable-version-specific-runtime-libs
Thread model: win32
gcc version 4.8.0 20130302 (experimental) [trunk revision 196403] (GCC)
COLLECT_GCC_OPTIONS='-v' '-c' '-mtune=i386' '-march=i386'
 c:/program files (x86)/gfortran/bin/../libexec/gcc/mingw32/4.8.0/f951.exe
bug_report.f03 -quiet -dumpbase bug_report.f03 -mtune=i386 -march=i386 -auxbase
bug_report -version -fintrinsic-modules-path c:/program files
(x86)/gfortran/bin/../lib/gcc/mingw32/4.8.0/finclude -o
C:\cygwin\tmp\cc7RQyBk.s
GNU Fortran (GCC) version 4.8.0 20130302 (experimental) [trunk revision 196403]
(mingw32)
        compiled by GNU C version 4.8.0 20130302 (experimental) [trunk revision
196403], GMP version 5.0.2, MPFR version 3.1.0, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU Fortran (GCC) version 4.8.0 20130302 (experimental) [trunk revision 196403]
(mingw32)
        compiled by GNU C version 4.8.0 20130302 (experimental) [trunk revision
196403], GMP version 5.0.2, MPFR version 3.1.0, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
f951.exe: internal compiler error: Segmentation fault
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug fortran/56816] f951.exe internal compiler error. segmentation fault
  2013-04-02 17:48 [Bug fortran/56816] New: f951.exe internal compiler error. segmentation fault dominique.pelletier at polymtl dot ca
  2013-04-02 17:49 ` [Bug fortran/56816] " dominique.pelletier at polymtl dot ca
  2013-04-02 17:59 ` Joost.VandeVondele at mat dot ethz.ch
@ 2013-04-02 19:02 ` dominique.pelletier at polymtl dot ca
  2013-04-02 19:02 ` dominique.pelletier at polymtl dot ca
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: dominique.pelletier at polymtl dot ca @ 2013-04-02 19:02 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56816

Dominique Pelletier <dominique.pelletier at polymtl dot ca> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #29777|0                           |1
        is obsolete|                            |

--- Comment #3 from Dominique Pelletier <dominique.pelletier at polymtl dot ca> 2013-04-02 19:02:07 UTC ---
Created attachment 29778
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29778
modules from metcalf's book Modern Fortran Explained

DP@P-DP /cygdrive/c/users/dp/Desktop/metcalf
$ gfortran -v -c bug_report.f03
Using built-in specs.
COLLECT_GCC=C:\Program Files (x86)\gfortran\bin\gfortran.exe
Target: mingw32
Configured with: ../gcc-trunk/configure --prefix=/mingw
--enable-languages=c,fortran,lto --with-gmp=/home/brad/gfortran/dependencies
--disable-werror --enable-threads --enable-nls --build=i586-pc-mingw32
--enable-libgomp --enable-shared --disable-win32-registry --with-dwarf2
--disable-sjlj-exceptions --enable-lto --build=mingw32
--enable-version-specific-runtime-libs
Thread model: win32
gcc version 4.8.0 20130302 (experimental) [trunk revision 196403] (GCC)
COLLECT_GCC_OPTIONS='-v' '-c' '-mtune=i386' '-march=i386'
 c:/program files (x86)/gfortran/bin/../libexec/gcc/mingw32/4.8.0/f951.exe
bug_report.f03 -quiet -dumpbase bug_report.f03 -mtune=i386 -march=i386 -auxbase
bug_report -version -fintrinsic-modules-path c:/program files
(x86)/gfortran/bin/../lib/gcc/mingw32/4.8.0/finclude -o
C:\cygwin\tmp\cc7RQyBk.s
GNU Fortran (GCC) version 4.8.0 20130302 (experimental) [trunk revision 196403]
(mingw32)
        compiled by GNU C version 4.8.0 20130302 (experimental) [trunk revision
196403], GMP version 5.0.2, MPFR version 3.1.0, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU Fortran (GCC) version 4.8.0 20130302 (experimental) [trunk revision 196403]
(mingw32)
        compiled by GNU C version 4.8.0 20130302 (experimental) [trunk revision
196403], GMP version 5.0.2, MPFR version 3.1.0, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
f951.exe: internal compiler error: Segmentation fault
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug fortran/56816] ICE in delete_root
  2013-04-02 17:48 [Bug fortran/56816] New: f951.exe internal compiler error. segmentation fault dominique.pelletier at polymtl dot ca
                   ` (3 preceding siblings ...)
  2013-04-02 19:02 ` dominique.pelletier at polymtl dot ca
@ 2013-04-02 20:41 ` tkoenig at gcc dot gnu.org
  2013-04-03 19:36 ` mikael at gcc dot gnu.org
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2013-04-02 20:41 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56816

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikael at gcc dot gnu.org,
                   |                            |tkoenig at gcc dot gnu.org
            Summary|f951.exe internal compiler  |ICE in delete_root
                   |error. segmentation fault   |

--- Comment #5 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2013-04-02 20:41:03 UTC ---
The attachment at

http://gcc.gnu.org/bugzilla/attachment.cgi?id=29779

should really go to this bug.

The traceback (see below) makes me suspect

http://gcc.gnu.org/ml/gcc-cvs/2013-03/msg00054.html

Mikael, any idea?

Program received signal SIGSEGV, Segmentation fault.
0x000000000050005b in delete_root (t=0x165ac30) at
../../trunk/gcc/fortran/bbt.c:150
150       if (t->left->priority > t->right->priority)
(gdb) bt
#0  0x000000000050005b in delete_root (t=0x165ac30) at
../../trunk/gcc/fortran/bbt.c:150
#1  0x0000000000500104 in delete_treap (old=old@entry=0x7fffffffd650,
t=<optimized out>, compare=compare@entry=
    0x593140 <compare_symtree(void*, void*)>) at
../../trunk/gcc/fortran/bbt.c:185
#2  0x00000000005000e9 in delete_treap (old=old@entry=0x7fffffffd650,
t=0x7ffff71ef678 <main_arena+88>, 
    compare=compare@entry=0x593140 <compare_symtree(void*, void*)>) at
../../trunk/gcc/fortran/bbt.c:183
#3  0x00000000005000e9 in delete_treap (old=old@entry=0x7fffffffd650,
t=0x165b8e0, 
    compare=compare@entry=0x593140 <compare_symtree(void*, void*)>) at
../../trunk/gcc/fortran/bbt.c:183
#4  0x00000000005000e9 in delete_treap (old=0x7fffffffd650, t=0x1656cd0,
compare=0x593140 <compare_symtree(void*, void*)>)
    at ../../trunk/gcc/fortran/bbt.c:183
#5  0x000000000050023f in gfc_delete_bbt (root=0x165ac40, old=<optimized out>,
compare=<optimized out>) at ../../trunk/gcc/fortran/bbt.c:197
#6  0x0000000000595e88 in gfc_delete_symtree (root=0x165ac40,
name=0x7ffff71ef678 <main_arena+88> "\300$h\001")
    at ../../trunk/gcc/fortran/symbol.c:2403
#7  0x00000000005971ef in gfc_restore_last_undo_checkpoint () at
../../trunk/gcc/fortran/symbol.c:3123
#8  0x00000000005623fb in reject_statement () at
../../trunk/gcc/fortran/parse.c:1745
#9  0x000000000056252d in match_word (subr=<optimized out>,
old_locus=old_locus@entry=0x7fffffffd760, str=0x0)
    at ../../trunk/gcc/fortran/parse.c:70
#10 0x0000000000562efc in match_word (old_locus=0x7fffffffd760, subr=<optimized
out>, str=0x0) at ../../trunk/gcc/fortran/parse.c:366
#11 decode_statement () at ../../trunk/gcc/fortran/parse.c:366
#12 0x0000000000564255 in next_free () at ../../trunk/gcc/fortran/parse.c:777
#13 next_statement () at ../../trunk/gcc/fortran/parse.c:970
#14 0x000000000056514d in parse_spec (st=<optimized out>, st@entry=ST_NONE) at
../../trunk/gcc/fortran/parse.c:2738
#15 0x0000000000567149 in parse_progunit (st=st@entry=ST_NONE) at
../../trunk/gcc/fortran/parse.c:4118
#16 0x00000000005674d1 in parse_contained (module=module@entry=1) at
../../trunk/gcc/fortran/parse.c:4057
#17 0x000000000056857a in parse_module () at
../../trunk/gcc/fortran/parse.c:4316
#18 gfc_parse_file () at ../../trunk/gcc/fortran/parse.c:4582
#19 0x00000000005a40b6 in gfc_be_parse_file () at
../../trunk/gcc/fortran/f95-lang.c:189
#20 0x000000000094eca6 in compile_file () at ../../trunk/gcc/toplev.c:543
#21 0x0000000000950b08 in do_compile () at ../../trunk/gcc/toplev.c:1864
#22 toplev_main (argc=2, argv=0x7fffffffdc08) at ../../trunk/gcc/toplev.c:1940
#23 0x00007ffff6e71455 in __libc_start_main () from /lib64/libc.so.6
#24 0x00000000004f9591 in _start () at ../sysdeps/x86_64/elf/start.S:113


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug fortran/56816] ICE in delete_root
  2013-04-02 17:48 [Bug fortran/56816] New: f951.exe internal compiler error. segmentation fault dominique.pelletier at polymtl dot ca
                   ` (4 preceding siblings ...)
  2013-04-02 20:41 ` [Bug fortran/56816] ICE in delete_root tkoenig at gcc dot gnu.org
@ 2013-04-03 19:36 ` mikael at gcc dot gnu.org
  2013-04-03 20:34 ` mikael at gcc dot gnu.org
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: mikael at gcc dot gnu.org @ 2013-04-03 19:36 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56816

--- Comment #6 from Mikael Morin <mikael at gcc dot gnu.org> 2013-04-03 19:36:03 UTC ---
gfc_match_select_type creates a new namespace before proceeding with parsing,
which it deletes on match failure.  However, symbols (from that namespace) that
may have been created in between are still reachable through the list of
symbols to undo (named gfc_undo_symbols previously, now
latest_undo_chgset->syms).  As the match fails, that list is used to free
(again) the symbols.

I suspect r192094 as the culprit, because it's where the gfc_match_select_type
namespace cleanup code was introduced.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug fortran/56816] ICE in delete_root
  2013-04-02 17:48 [Bug fortran/56816] New: f951.exe internal compiler error. segmentation fault dominique.pelletier at polymtl dot ca
                   ` (5 preceding siblings ...)
  2013-04-03 19:36 ` mikael at gcc dot gnu.org
@ 2013-04-03 20:34 ` mikael at gcc dot gnu.org
  2013-04-03 20:58 ` mikael at gcc dot gnu.org
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: mikael at gcc dot gnu.org @ 2013-04-03 20:34 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56816

--- Comment #7 from Mikael Morin <mikael at gcc dot gnu.org> 2013-04-03 20:33:59 UTC ---
The following tentative patch uses the recent multiple change set facility.
It is not sufficient though. It triggers an assertion in
enforce_single_undo_checkpoint, called from gfc_commit_symbol which doesn't
support multiple change sets.

Index: match.c
===================================================================
--- match.c    (révision 196417)
+++ match.c    (copie de travail)
@@ -5365,6 +5365,7 @@ gfc_match_select_type (void)
   bool class_array;
   gfc_symbol *sym;
   gfc_namespace *parent_ns;
+  gfc_undo_change_set chg_syms;

   m = gfc_match_label ();
   if (m == MATCH_ERROR)
@@ -5375,6 +5376,7 @@ gfc_match_select_type (void)
     return m;

   gfc_current_ns = gfc_build_block_ns (gfc_current_ns);
+  gfc_new_undo_checkpoint (chg_syms);

   m = gfc_match (" %n => %e", name, &expr2);
   if (m == MATCH_YES)
@@ -5441,9 +5443,11 @@ gfc_match_select_type (void)

   select_type_push (expr1->symtree->n.sym);

+  gfc_drop_last_undo_checkpoint ();
   return MATCH_YES;

 cleanup:
+  gfc_restore_last_undo_checkpoint ();
   parent_ns = gfc_current_ns->parent;
   gfc_free_namespace (gfc_current_ns);
   gfc_current_ns = parent_ns;
>From gcc-bugs-return-419203-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Apr 03 20:53:05 2013
Return-Path: <gcc-bugs-return-419203-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 23894 invoked by alias); 3 Apr 2013 20:53:05 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 23795 invoked by uid 48); 3 Apr 2013 20:53:00 -0000
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/56836] Template delegating constructor not calling target constructor
Date: Wed, 03 Apr 2013 20:53:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: pinskia at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Changed-Fields:
Message-ID: <bug-56836-4-Ppxfed3nRo@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-56836-4@http.gcc.gnu.org/bugzilla/>
References: <bug-56836-4@http.gcc.gnu.org/bugzilla/>
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
Content-Type: text/plain; charset="UTF-8"
MIME-Version: 1.0
X-SW-Source: 2013-04/txt/msg00348.txt.bz2
Content-length: 278


http://gcc.gnu.org/bugzilla/show_bug.cgi?idV836

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2013-04-03 20:53:00 UTC ---
I think:
: foo( const_cast< const foo<T_>& >(f) )

calls the copy constructor which templates can never be a copy constructor.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug fortran/56816] ICE in delete_root
  2013-04-02 17:48 [Bug fortran/56816] New: f951.exe internal compiler error. segmentation fault dominique.pelletier at polymtl dot ca
                   ` (6 preceding siblings ...)
  2013-04-03 20:34 ` mikael at gcc dot gnu.org
@ 2013-04-03 20:58 ` mikael at gcc dot gnu.org
  2013-04-07 11:28 ` mikael at gcc dot gnu.org
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: mikael at gcc dot gnu.org @ 2013-04-03 20:58 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56816

--- Comment #8 from Mikael Morin <mikael at gcc dot gnu.org> 2013-04-03 20:58:25 UTC ---
Another tentative patch.
This moves the namespace release after the call to gfc_undo_symbols.

With it, one gets among a trail of other errors:
bug_report.f03:322.8:

        select type ( v => this % value
        1
Error: Unclassifiable statement at (1)



Index: match.c
===================================================================
--- match.c    (révision 196417)
+++ match.c    (copie de travail)
@@ -5364,7 +5364,6 @@ gfc_match_select_type (void)
   char name[GFC_MAX_SYMBOL_LEN];
   bool class_array;
   gfc_symbol *sym;
-  gfc_namespace *parent_ns;

   m = gfc_match_label ();
   if (m == MATCH_ERROR)
@@ -5374,8 +5373,6 @@ gfc_match_select_type (void)
   if (m != MATCH_YES)
     return m;

-  gfc_current_ns = gfc_build_block_ns (gfc_current_ns);
-
   m = gfc_match (" %n => %e", name, &expr2);
   if (m == MATCH_YES)
     {
@@ -5444,9 +5441,6 @@ gfc_match_select_type (void)
   return MATCH_YES;

 cleanup:
-  parent_ns = gfc_current_ns->parent;
-  gfc_free_namespace (gfc_current_ns);
-  gfc_current_ns = parent_ns;
   return m;
 }

Index: parse.c
===================================================================
--- parse.c    (révision 196417)
+++ parse.c    (copie de travail)
@@ -262,6 +262,7 @@ end_of_block:
 static gfc_statement
 decode_statement (void)
 {
+  gfc_namespace *ns;
   gfc_statement st;
   locus old_locus;
   match m;
@@ -363,7 +364,12 @@ decode_statement (void)
   match (NULL, gfc_match_associate, ST_ASSOCIATE);
   match (NULL, gfc_match_critical, ST_CRITICAL);
   match (NULL, gfc_match_select, ST_SELECT_CASE);
+
+  gfc_current_ns = gfc_build_block_ns (gfc_current_ns);
   match (NULL, gfc_match_select_type, ST_SELECT_TYPE);
+  ns = gfc_current_ns;
+  gfc_current_ns = gfc_current_ns->parent;
+  gfc_free_namespace (ns);

   /* General statement matching: Instead of testing every possible
      statement, we eliminate most possibilities by peeking at the
>From gcc-bugs-return-419206-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Apr 03 21:00:54 2013
Return-Path: <gcc-bugs-return-419206-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 30121 invoked by alias); 3 Apr 2013 21:00:54 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 30076 invoked by uid 48); 3 Apr 2013 21:00:50 -0000
From: "danglin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/55487] ICE in mark_jump_label_1, at jump.c:1134 compiling gcc.c-torture/execute/pr51447.c at -O2 and above
Date: Wed, 03 Apr 2013 21:00:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: middle-end
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: danglin at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Changed-Fields:
Message-ID: <bug-55487-4-83cNwQ7oX2@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-55487-4@http.gcc.gnu.org/bugzilla/>
References: <bug-55487-4@http.gcc.gnu.org/bugzilla/>
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
Content-Type: text/plain; charset="UTF-8"
MIME-Version: 1.0
X-SW-Source: 2013-04/txt/msg00351.txt.bz2
Content-length: 916


http://gcc.gnu.org/bugzilla/show_bug.cgi?idU487

--- Comment #5 from John David Anglin <danglin at gcc dot gnu.org> 2013-04-03 21:00:49 UTC ---
In reload_as_needed, the reload processing for the following insn the
note:

(gdb) p debug_rtx (insn)
(jump_insn 25 22 26 3 (set (pc)
        (if_then_else (eq (reg/f:DI 28 %r28 [orig:74 ptr ] [74])
                (reg/f:DI 80))
            (label_ref 30)
            (pc)))
/test/gnu/gcc/gcc/gcc/testsuite/gcc.c-torture/execute/pr51447.c:24 49
{*pa.md:1495}
     (expr_list:REG_DEAD (reg/f:DI 28 %r28 [orig:74 ptr ] [74])
        (expr_list:REG_EQUAL (if_then_else (eq (reg/f:DI 28 %r28 [orig:74 ptr ]
[74])
                    (label_ref:DI [18 deleted]))
                (label_ref 30)
                (pc))
            (expr_list:REG_BR_PROB (const_int 9996 [0x270c])
                (nil))))
 -> 30)
(gdb) p insn
$120 = (rtx) 0x4023b3f0


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug fortran/56816] ICE in delete_root
  2013-04-02 17:48 [Bug fortran/56816] New: f951.exe internal compiler error. segmentation fault dominique.pelletier at polymtl dot ca
                   ` (7 preceding siblings ...)
  2013-04-03 20:58 ` mikael at gcc dot gnu.org
@ 2013-04-07 11:28 ` mikael at gcc dot gnu.org
  2013-04-07 11:30 ` mikael at gcc dot gnu.org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: mikael at gcc dot gnu.org @ 2013-04-07 11:28 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56816

--- Comment #9 from Mikael Morin <mikael at gcc dot gnu.org> 2013-04-07 11:28:45 UTC ---
Created attachment 29817
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29817
Another tentative patch

This variant moves the namespace allocation to parse_select_type_block
(parse.c), like it's done for associate blocks.  This implies delaying name to
symbol resolution for associate-name, i.e. register the name only in
gfc_match_select_type, and wait for the namespace to be allocated in
parse_select_type_block to retrieve the symbol.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug fortran/56816] ICE in delete_root
  2013-04-02 17:48 [Bug fortran/56816] New: f951.exe internal compiler error. segmentation fault dominique.pelletier at polymtl dot ca
                   ` (8 preceding siblings ...)
  2013-04-07 11:28 ` mikael at gcc dot gnu.org
@ 2013-04-07 11:30 ` mikael at gcc dot gnu.org
  2013-04-15 12:59 ` burnus at gcc dot gnu.org
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: mikael at gcc dot gnu.org @ 2013-04-07 11:30 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56816

Mikael Morin <mikael at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2013-04-07
         AssignedTo|unassigned at gcc dot       |mikael at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1

--- Comment #10 from Mikael Morin <mikael at gcc dot gnu.org> 2013-04-07 11:30:43 UTC ---
Comment #9, is a bit too complex; I will test and submit comment #8, which
seems to be the safest.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug fortran/56816] ICE in delete_root
  2013-04-02 17:48 [Bug fortran/56816] New: f951.exe internal compiler error. segmentation fault dominique.pelletier at polymtl dot ca
                   ` (9 preceding siblings ...)
  2013-04-07 11:30 ` mikael at gcc dot gnu.org
@ 2013-04-15 12:59 ` burnus at gcc dot gnu.org
  2013-04-18 18:22 ` [Bug fortran/56816] [4.8/4.9 regression] " mikael at gcc dot gnu.org
  2013-04-18 18:23 ` mikael at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-04-15 12:59 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56816

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #11 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-04-15 12:59:44 UTC ---
Author: mikael
Date: Sun Apr 14 17:50:57 2013
New Revision: 197950

URL: http://gcc.gnu.org/viewcvs?rev=197950&root=gcc&view=rev
Log:
fortran/
    PR fortran/56816
    * match.c (gfc_match_select_type): Add syntax error. Move namespace
    allocation and cleanup...
    * parse.c (decode_statement): ... here.

testsuite/
    PR fortran/56816
    * gfortran.dg/select_type_33.f03: New test.


Added:
    trunk/gcc/testsuite/gfortran.dg/select_type_33.f03
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/match.c
    trunk/gcc/fortran/parse.c
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug fortran/56816] [4.8/4.9 regression] ICE in delete_root
  2013-04-02 17:48 [Bug fortran/56816] New: f951.exe internal compiler error. segmentation fault dominique.pelletier at polymtl dot ca
                   ` (10 preceding siblings ...)
  2013-04-15 12:59 ` burnus at gcc dot gnu.org
@ 2013-04-18 18:22 ` mikael at gcc dot gnu.org
  2013-04-18 18:23 ` mikael at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: mikael at gcc dot gnu.org @ 2013-04-18 18:22 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56816

Mikael Morin <mikael at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.8.1
            Summary|ICE in delete_root          |[4.8/4.9 regression] ICE in
                   |                            |delete_root

--- Comment #12 from Mikael Morin <mikael at gcc dot gnu.org> 2013-04-18 18:22:49 UTC ---
Author: mikael
Date: Thu Apr 18 18:20:22 2013
New Revision: 198065

URL: http://gcc.gnu.org/viewcvs?rev=198065&root=gcc&view=rev
Log:
fortran/
    PR fortran/56816
    * match.c (gfc_match_select_type): Add syntax error. Move namespace
    allocation and cleanup...
    * parse.c (decode_statement): ... here.

testsuite/
    PR fortran/56816
    * gfortran.dg/select_type_33.f03: New test.


Added:
    branches/gcc-4_8-branch/gcc/testsuite/gfortran.dg/select_type_33.f03
Modified:
    branches/gcc-4_8-branch/gcc/fortran/ChangeLog
    branches/gcc-4_8-branch/gcc/fortran/match.c
    branches/gcc-4_8-branch/gcc/fortran/parse.c
    branches/gcc-4_8-branch/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug fortran/56816] [4.8/4.9 regression] ICE in delete_root
  2013-04-02 17:48 [Bug fortran/56816] New: f951.exe internal compiler error. segmentation fault dominique.pelletier at polymtl dot ca
                   ` (11 preceding siblings ...)
  2013-04-18 18:22 ` [Bug fortran/56816] [4.8/4.9 regression] " mikael at gcc dot gnu.org
@ 2013-04-18 18:23 ` mikael at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: mikael at gcc dot gnu.org @ 2013-04-18 18:23 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56816

Mikael Morin <mikael at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #13 from Mikael Morin <mikael at gcc dot gnu.org> 2013-04-18 18:23:29 UTC ---
Fixed for 4.8.1 and 4.9.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-04-18 18:23 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-02 17:48 [Bug fortran/56816] New: f951.exe internal compiler error. segmentation fault dominique.pelletier at polymtl dot ca
2013-04-02 17:49 ` [Bug fortran/56816] " dominique.pelletier at polymtl dot ca
2013-04-02 17:59 ` Joost.VandeVondele at mat dot ethz.ch
2013-04-02 19:02 ` dominique.pelletier at polymtl dot ca
2013-04-02 19:02 ` dominique.pelletier at polymtl dot ca
2013-04-02 20:41 ` [Bug fortran/56816] ICE in delete_root tkoenig at gcc dot gnu.org
2013-04-03 19:36 ` mikael at gcc dot gnu.org
2013-04-03 20:34 ` mikael at gcc dot gnu.org
2013-04-03 20:58 ` mikael at gcc dot gnu.org
2013-04-07 11:28 ` mikael at gcc dot gnu.org
2013-04-07 11:30 ` mikael at gcc dot gnu.org
2013-04-15 12:59 ` burnus at gcc dot gnu.org
2013-04-18 18:22 ` [Bug fortran/56816] [4.8/4.9 regression] " mikael at gcc dot gnu.org
2013-04-18 18:23 ` 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).