public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/50752] New: [4.7 Regression] ICE in match_kind_param
@ 2011-10-17  6:50 Joost.VandeVondele at pci dot uzh.ch
  2011-10-17  8:09 ` [Bug fortran/50752] " janus at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Joost.VandeVondele at pci dot uzh.ch @ 2011-10-17  6:50 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50752
           Summary: [4.7 Regression] ICE in match_kind_param
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: Joost.VandeVondele@pci.uzh.ch


This one-liner leads to a segfault in 4.7:

vondele@pcihopt3:/data03/vondele/bugs/ice> cat bug.f90
    rPos=0.0_dp
vondele@pcihopt3:/data03/vondele/bugs/ice> gfortran bug.f90
f951: internal compiler error: Segmentation fault

60        *is_iso_c = sym->attr.is_iso_c;
(gdb) bt
#0  0x000000000056db6f in match_kind_param (is_iso_c=0x7fffffffd51c) at
../../gcc/gcc/fortran/primary.c:60
#1  get_kind (is_iso_c=0x7fffffffd51c) at ../../gcc/gcc/fortran/primary.c:103
#2  0x000000000056de7b in match_real_constant (result=0x7fffffffd660,
signflag=Unhandled dwarf expression opcode 0xf3
) at ../../gcc/gcc/fortran/primary.c:625
#3  0x000000000056ed6c in gfc_match_literal_constant (result=0x7fffffffd660,
signflag=0) at ../../gcc/gcc/fortran/primary.c:1367
#4  0x000000000055994e in match_primary (result=0x7fffffffd6c0) at
../../gcc/gcc/fortran/matchexp.c:149
#5  match_level_1 (result=0x7fffffffd6c0) at
../../gcc/gcc/fortran/matchexp.c:210
#6  match_mult_operand (result=0x7fffffffd6c0) at
../../gcc/gcc/fortran/matchexp.c:264
#7  0x0000000000559c3d in match_add_operand (result=0x7fffffffd718) at
../../gcc/gcc/fortran/matchexp.c:353
#8  0x0000000000559f65 in match_level_2 (result=0x7fffffffd760) at
../../gcc/gcc/fortran/matchexp.c:477
#9  0x000000000055a005 in match_level_3 (result=0x7fffffffd7c0) at
../../gcc/gcc/fortran/matchexp.c:548
#10 0x000000000055a13a in match_level_4 (result=0x7fffffffd810) at
../../gcc/gcc/fortran/matchexp.c:596


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

* [Bug fortran/50752] [4.7 Regression] ICE in match_kind_param
  2011-10-17  6:50 [Bug fortran/50752] New: [4.7 Regression] ICE in match_kind_param Joost.VandeVondele at pci dot uzh.ch
@ 2011-10-17  8:09 ` janus at gcc dot gnu.org
  2011-10-17  9:37 ` burnus at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: janus at gcc dot gnu.org @ 2011-10-17  8:09 UTC (permalink / raw)
  To: gcc-bugs

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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
           Keywords|                            |ice-on-invalid-code
   Last reconfirmed|                            |2011-10-17
                 CC|                            |janus at gcc dot gnu.org
         AssignedTo|unassigned at gcc dot       |janus at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1

--- Comment #1 from janus at gcc dot gnu.org 2011-10-17 08:08:59 UTC ---
This is clearly due to

http://gcc.gnu.org/viewcvs?view=revision&revision=180062

which was my fix for PR47023. It's easy to fix this, however. To offending line
should just came a bit too soon:


Index: gcc/fortran/primary.c
===================================================================
--- gcc/fortran/primary.c    (revision 180062)
+++ gcc/fortran/primary.c    (working copy)
@@ -57,11 +57,11 @@ match_kind_param (int *kind, int *is_iso_c)
   if (gfc_find_symbol (name, NULL, 1, &sym))
     return MATCH_ERROR;

-  *is_iso_c = sym->attr.is_iso_c;
-
   if (sym == NULL)
     return MATCH_NO;

+  *is_iso_c = sym->attr.is_iso_c;
+
   if (sym->attr.flavor != FL_PARAMETER)
     return MATCH_NO;


Sorry for the breakage. Will commit as obvious.


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

* [Bug fortran/50752] [4.7 Regression] ICE in match_kind_param
  2011-10-17  6:50 [Bug fortran/50752] New: [4.7 Regression] ICE in match_kind_param Joost.VandeVondele at pci dot uzh.ch
  2011-10-17  8:09 ` [Bug fortran/50752] " janus at gcc dot gnu.org
@ 2011-10-17  9:37 ` burnus at gcc dot gnu.org
  2011-10-17  9:47 ` janus at gcc dot gnu.org
  2011-10-17 10:54 ` janus at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-10-17  9:37 UTC (permalink / raw)
  To: gcc-bugs

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

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

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


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

* [Bug fortran/50752] [4.7 Regression] ICE in match_kind_param
  2011-10-17  6:50 [Bug fortran/50752] New: [4.7 Regression] ICE in match_kind_param Joost.VandeVondele at pci dot uzh.ch
  2011-10-17  8:09 ` [Bug fortran/50752] " janus at gcc dot gnu.org
  2011-10-17  9:37 ` burnus at gcc dot gnu.org
@ 2011-10-17  9:47 ` janus at gcc dot gnu.org
  2011-10-17 10:54 ` janus at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: janus at gcc dot gnu.org @ 2011-10-17  9:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from janus at gcc dot gnu.org 2011-10-17 09:46:34 UTC ---
Author: janus
Date: Mon Oct 17 09:46:30 2011
New Revision: 180079

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180079
Log:
2011-10-17  Janus Weil  <janus@gcc.gnu.org>

    PR fortran/47023
    PR fortran/50752
    * primary.c (match_kind_param): Avoid segfault.


2011-10-17  Janus Weil  <janus@gcc.gnu.org>

    PR fortran/47023
    PR fortran/50752
    * gfortran.dg/kind_tests_4.f90: New.

Added:
    trunk/gcc/testsuite/gfortran.dg/kind_tests_4.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/primary.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug fortran/50752] [4.7 Regression] ICE in match_kind_param
  2011-10-17  6:50 [Bug fortran/50752] New: [4.7 Regression] ICE in match_kind_param Joost.VandeVondele at pci dot uzh.ch
                   ` (2 preceding siblings ...)
  2011-10-17  9:47 ` janus at gcc dot gnu.org
@ 2011-10-17 10:54 ` janus at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: janus at gcc dot gnu.org @ 2011-10-17 10:54 UTC (permalink / raw)
  To: gcc-bugs

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

janus at gcc dot gnu.org changed:

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

--- Comment #3 from janus at gcc dot gnu.org 2011-10-17 10:53:37 UTC ---
Fixed with r180079. Closing.

Thanks for catching this so quickly, Joost!


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

end of thread, other threads:[~2011-10-17 10:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-17  6:50 [Bug fortran/50752] New: [4.7 Regression] ICE in match_kind_param Joost.VandeVondele at pci dot uzh.ch
2011-10-17  8:09 ` [Bug fortran/50752] " janus at gcc dot gnu.org
2011-10-17  9:37 ` burnus at gcc dot gnu.org
2011-10-17  9:47 ` janus at gcc dot gnu.org
2011-10-17 10:54 ` janus 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).