public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/50403] New: SIGSEGV in gfc_use_derived
@ 2011-09-15 8:26 zeccav at gmail dot com
2011-09-15 12:18 ` [Bug fortran/50403] " janus at gcc dot gnu.org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: zeccav at gmail dot com @ 2011-09-15 8:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50403
Bug #: 50403
Summary: SIGSEGV in gfc_use_derived
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: zeccav@gmail.com
Created attachment 25279
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25279
just compile it
SIGSEGV in gfc_use_derived
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/50403] SIGSEGV in gfc_use_derived
2011-09-15 8:26 [Bug fortran/50403] New: SIGSEGV in gfc_use_derived zeccav at gmail dot com
@ 2011-09-15 12:18 ` janus at gcc dot gnu.org
2011-09-15 17:50 ` janus at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: janus at gcc dot gnu.org @ 2011-09-15 12:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50403
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Keywords| |ice-on-invalid-code
Last reconfirmed| |2011-09-15
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-09-15 11:41:06 UTC ---
This one is also obvious:
Index: gcc/fortran/symbol.c
===================================================================
--- gcc/fortran/symbol.c (revision 178876)
+++ gcc/fortran/symbol.c (working copy)
@@ -1945,6 +1945,8 @@
gfc_symtree *st;
int i;
+ if (!sym) return NULL;
+
if (sym->components != NULL || sym->attr.zero_comp)
return sym; /* Already defined. */
Btw: Where do you get this enormous amount of invalid Fortran code?
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/50403] SIGSEGV in gfc_use_derived
2011-09-15 8:26 [Bug fortran/50403] New: SIGSEGV in gfc_use_derived zeccav at gmail dot com
2011-09-15 12:18 ` [Bug fortran/50403] " janus at gcc dot gnu.org
@ 2011-09-15 17:50 ` janus at gcc dot gnu.org
2011-09-15 17:55 ` janus at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: janus at gcc dot gnu.org @ 2011-09-15 17:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50403
--- Comment #2 from janus at gcc dot gnu.org 2011-09-15 17:48:36 UTC ---
Author: janus
Date: Thu Sep 15 17:48:27 2011
New Revision: 178889
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=178889
Log:
2011-09-15 Janus Weil <janus@gcc.gnu.org>
PR fortran/50401
* resolve.c (resolve_transfer): Check if component 'ref' is defined.
PR fortran/50403
* symbol.c (gfc_use_derived): Check if argument 'sym' is defined.
2011-09-15 Janus Weil <janus@gcc.gnu.org>
PR fortran/50401
PR fortran/50403
* gfortran.dg/function_types_3.f90: New.
Added:
trunk/gcc/testsuite/gfortran.dg/function_types_3.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/resolve.c
trunk/gcc/fortran/symbol.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/50403] SIGSEGV in gfc_use_derived
2011-09-15 8:26 [Bug fortran/50403] New: SIGSEGV in gfc_use_derived zeccav at gmail dot com
2011-09-15 12:18 ` [Bug fortran/50403] " janus at gcc dot gnu.org
2011-09-15 17:50 ` janus at gcc dot gnu.org
@ 2011-09-15 17:55 ` janus at gcc dot gnu.org
2011-09-15 20:28 ` zeccav at gmail dot com
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: janus at gcc dot gnu.org @ 2011-09-15 17:55 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50403
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-09-15 17:50:25 UTC ---
Fixed on trunk with r178889. Closing.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/50403] SIGSEGV in gfc_use_derived
2011-09-15 8:26 [Bug fortran/50403] New: SIGSEGV in gfc_use_derived zeccav at gmail dot com
` (2 preceding siblings ...)
2011-09-15 17:55 ` janus at gcc dot gnu.org
@ 2011-09-15 20:28 ` zeccav at gmail dot com
2011-09-15 21:14 ` janus at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: zeccav at gmail dot com @ 2011-09-15 20:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50403
--- Comment #4 from Vittorio Zecca <zeccav at gmail dot com> 2011-09-15 20:26:18 UTC ---
I created it.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/50403] SIGSEGV in gfc_use_derived
2011-09-15 8:26 [Bug fortran/50403] New: SIGSEGV in gfc_use_derived zeccav at gmail dot com
` (3 preceding siblings ...)
2011-09-15 20:28 ` zeccav at gmail dot com
@ 2011-09-15 21:14 ` janus at gcc dot gnu.org
2011-09-16 7:31 ` zeccav at gmail dot com
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: janus at gcc dot gnu.org @ 2011-09-15 21:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50403
--- Comment #5 from janus at gcc dot gnu.org 2011-09-15 20:48:18 UTC ---
(In reply to comment #4)
> I created it.
Sorry, I don't understand what you're trying to say. Could you please
elaborate?
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/50403] SIGSEGV in gfc_use_derived
2011-09-15 8:26 [Bug fortran/50403] New: SIGSEGV in gfc_use_derived zeccav at gmail dot com
` (4 preceding siblings ...)
2011-09-15 21:14 ` janus at gcc dot gnu.org
@ 2011-09-16 7:31 ` zeccav at gmail dot com
2011-09-16 8:04 ` janus at gcc dot gnu.org
2011-09-17 11:55 ` janus at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: zeccav at gmail dot com @ 2011-09-16 7:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50403
--- Comment #6 from Vittorio Zecca <zeccav at gmail dot com> 2011-09-16 07:12:52 UTC ---
You asked where do I get such an enormous amount of invalid fortran code.
Probably I was too terse in my answer.
I created invalid codes to check corner or extreme cases.
I do believe that to prevent is better than to cure.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/50403] SIGSEGV in gfc_use_derived
2011-09-15 8:26 [Bug fortran/50403] New: SIGSEGV in gfc_use_derived zeccav at gmail dot com
` (5 preceding siblings ...)
2011-09-16 7:31 ` zeccav at gmail dot com
@ 2011-09-16 8:04 ` janus at gcc dot gnu.org
2011-09-17 11:55 ` janus at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: janus at gcc dot gnu.org @ 2011-09-16 8:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50403
--- Comment #7 from janus at gcc dot gnu.org 2011-09-16 07:30:25 UTC ---
(In reply to comment #6)
> You asked where do I get such an enormous amount of invalid fortran code.
> Probably I was too terse in my answer.
Ok, I get it.
> I created invalid codes to check corner or extreme cases.
> I do believe that to prevent is better than to cure.
Agreed. Your test cases certainly help to make gfortran more bullet-proof.
Thanks a lot!
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/50403] SIGSEGV in gfc_use_derived
2011-09-15 8:26 [Bug fortran/50403] New: SIGSEGV in gfc_use_derived zeccav at gmail dot com
` (6 preceding siblings ...)
2011-09-16 8:04 ` janus at gcc dot gnu.org
@ 2011-09-17 11:55 ` janus at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: janus at gcc dot gnu.org @ 2011-09-17 11:55 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50403
--- Comment #8 from janus at gcc dot gnu.org 2011-09-17 10:54:53 UTC ---
Author: janus
Date: Sat Sep 17 10:54:50 2011
New Revision: 178928
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=178928
Log:
2011-09-17 Janus Weil <janus@gcc.gnu.org>
PR fortran/50403
* symbol.c (gfc_use_derived): Fix coding style.
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/symbol.c
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-09-17 10:55 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-15 8:26 [Bug fortran/50403] New: SIGSEGV in gfc_use_derived zeccav at gmail dot com
2011-09-15 12:18 ` [Bug fortran/50403] " janus at gcc dot gnu.org
2011-09-15 17:50 ` janus at gcc dot gnu.org
2011-09-15 17:55 ` janus at gcc dot gnu.org
2011-09-15 20:28 ` zeccav at gmail dot com
2011-09-15 21:14 ` janus at gcc dot gnu.org
2011-09-16 7:31 ` zeccav at gmail dot com
2011-09-16 8:04 ` janus at gcc dot gnu.org
2011-09-17 11:55 ` 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).