public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/58226] New: negative subscript pos at fortran/options.c:1205
@ 2013-08-23 6:02 zeccav at gmail dot com
2013-09-02 12:34 ` [Bug fortran/58226] " dominiq at lps dot ens.fr
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: zeccav at gmail dot com @ 2013-08-23 6:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58226
Bug ID: 58226
Summary: negative subscript pos at fortran/options.c:1205
Product: gcc
Version: 4.8.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: zeccav at gmail dot com
gfortran 4.8.2 negative subscript pos at fortran/options.c:1205 statement
result[--pos] = '\0';
compiling the following
use iso_fortran_env
print *,compiler_options()
end
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/58226] negative subscript pos at fortran/options.c:1205
2013-08-23 6:02 [Bug fortran/58226] New: negative subscript pos at fortran/options.c:1205 zeccav at gmail dot com
@ 2013-09-02 12:34 ` dominiq at lps dot ens.fr
2013-10-06 1:17 ` bdavis at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-09-02 12:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58226
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2013-09-02
Ever confirmed|0 |1
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
This works for me (x86_64-apple-darwin10) with gfortran 4.8.1 and trunk
r202154.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/58226] negative subscript pos at fortran/options.c:1205
2013-08-23 6:02 [Bug fortran/58226] New: negative subscript pos at fortran/options.c:1205 zeccav at gmail dot com
2013-09-02 12:34 ` [Bug fortran/58226] " dominiq at lps dot ens.fr
@ 2013-10-06 1:17 ` bdavis at gcc dot gnu.org
2013-10-06 15:42 ` burnus at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: bdavis at gcc dot gnu.org @ 2013-10-06 1:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58226
Bud Davis <bdavis at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bdavis at gcc dot gnu.org
--- Comment #2 from Bud Davis <bdavis at gcc dot gnu.org> ---
works for me.
GNU Fortran (GCC) 4.9.0 20131005 (experimental)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/58226] negative subscript pos at fortran/options.c:1205
2013-08-23 6:02 [Bug fortran/58226] New: negative subscript pos at fortran/options.c:1205 zeccav at gmail dot com
2013-09-02 12:34 ` [Bug fortran/58226] " dominiq at lps dot ens.fr
2013-10-06 1:17 ` bdavis at gcc dot gnu.org
@ 2013-10-06 15:42 ` burnus at gcc dot gnu.org
2013-10-06 16:32 ` zeccav at gmail dot com
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-10-06 15:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58226
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
CC| |burnus at gcc dot gnu.org
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Also works for me as I have "-mtune=generic -march=x86-64" by default.
Code wise, I think one should do something like the following:
--- options.c (Revision 203206)
+++ options.c (Arbeitskopie)
@@ -1139,6 +1139,10 @@ gfc_get_option_string (void)
size_t len, pos;
char *result;
+ /* Allocate and return a one-character string with '\0'. */
+ if (!save_decoded_options_count)
+ return = XCNEWVEC (char, 1);
+
/* Determine required string length. */
len = 0;
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/58226] negative subscript pos at fortran/options.c:1205
2013-08-23 6:02 [Bug fortran/58226] New: negative subscript pos at fortran/options.c:1205 zeccav at gmail dot com
` (2 preceding siblings ...)
2013-10-06 15:42 ` burnus at gcc dot gnu.org
@ 2013-10-06 16:32 ` zeccav at gmail dot com
2013-10-10 19:32 ` burnus at gcc dot gnu.org
2013-10-10 19:33 ` burnus at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: zeccav at gmail dot com @ 2013-10-06 16:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58226
--- Comment #4 from Vittorio Zecca <zeccav at gmail dot com> ---
I could not reproduce the issue with version 4.8.2 20130920, probably
it has silently been
fixed sometime in the past.
Maybe this issue should be closed.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/58226] negative subscript pos at fortran/options.c:1205
2013-08-23 6:02 [Bug fortran/58226] New: negative subscript pos at fortran/options.c:1205 zeccav at gmail dot com
` (3 preceding siblings ...)
2013-10-06 16:32 ` zeccav at gmail dot com
@ 2013-10-10 19:32 ` burnus at gcc dot gnu.org
2013-10-10 19:33 ` burnus at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-10-10 19:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58226
--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Author: burnus
Date: Thu Oct 10 19:32:22 2013
New Revision: 203394
URL: http://gcc.gnu.org/viewcvs?rev=203394&root=gcc&view=rev
Log:
2013-10-09 Tobias Burnus <burnus@net-b.de>
PR fortran/58226
* options.c (gfc_get_option_string): Handle zero arg case.
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/options.c
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/58226] negative subscript pos at fortran/options.c:1205
2013-08-23 6:02 [Bug fortran/58226] New: negative subscript pos at fortran/options.c:1205 zeccav at gmail dot com
` (4 preceding siblings ...)
2013-10-10 19:32 ` burnus at gcc dot gnu.org
@ 2013-10-10 19:33 ` burnus at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-10-10 19:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58226
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> ---
FIXED on the trunk (4.9). Thanks for the report!
(In reply to Vittorio Zecca from comment #4)
> I could not reproduce the issue with version 4.8.2 20130920, probably
> it has silently been fixed sometime in the past.
Well, it hasn't but more and more targets do have a by default some compiler
options. And in that case, there is no segfault.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-10-10 19:33 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-23 6:02 [Bug fortran/58226] New: negative subscript pos at fortran/options.c:1205 zeccav at gmail dot com
2013-09-02 12:34 ` [Bug fortran/58226] " dominiq at lps dot ens.fr
2013-10-06 1:17 ` bdavis at gcc dot gnu.org
2013-10-06 15:42 ` burnus at gcc dot gnu.org
2013-10-06 16:32 ` zeccav at gmail dot com
2013-10-10 19:32 ` burnus at gcc dot gnu.org
2013-10-10 19:33 ` 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).