public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/39576] New: gcc/fortran/error.c's error_print - missing "break" ?
@ 2009-03-29 9:30 burnus at gcc dot gnu dot org
2009-04-07 9:24 ` [Bug fortran/39576] " pault at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-03-29 9:30 UTC (permalink / raw)
To: gcc-bugs
Sent to me in a private email - and not yet checked.
------------------------------------------------------------------
In gcc/fortran/error.c this statement
case 'u':
arg[pos].type = TYPE_UINTEGER;
looks like it's missing a 'break'. If a translator provided a format string
translation that contained the substring "%ulu", then an argument of type
TYPE_ULONGINT would be fetched and stored in arg[pos].u.ulongintval, and later,
spec[n++].u.uintval would be used. Which would lead to wrong results on 64-bit
platforms.
--
Summary: gcc/fortran/error.c's error_print - missing "break" ?
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39576
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/39576] gcc/fortran/error.c's error_print - missing "break" ?
2009-03-29 9:30 [Bug fortran/39576] New: gcc/fortran/error.c's error_print - missing "break" ? burnus at gcc dot gnu dot org
@ 2009-04-07 9:24 ` pault at gcc dot gnu dot org
2009-05-05 8:30 ` [Bug fortran/39576] gcc/fortran/error.c's error.c missing "break" fxcoudert at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: pault at gcc dot gnu dot org @ 2009-04-07 9:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pault at gcc dot gnu dot org 2009-04-07 09:23 -------
from error.c(error_print)
00470 case 'u':
00471 arg[pos].type = TYPE_UINTEGER;
00472
00473 case 'l':
00474 c = *format++;
00475 if (c == 'u')
00476 arg[pos].type = TYPE_ULONGINT;
00477 else if (c == 'i' || c == 'd')
00478 arg[pos].type = TYPE_LONGINT;
00479 else
00480 gcc_unreachable ();
00481 break;
....so, yes, without analysis I would say that the report is correct.
Confirmed. I have given it the "wrong-code" keyword because it is likely to be
true and to raise this out of the noise.
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |wrong-code
Last reconfirmed|0000-00-00 00:00:00 |2009-04-07 09:23:55
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39576
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/39576] gcc/fortran/error.c's error.c missing "break"
2009-03-29 9:30 [Bug fortran/39576] New: gcc/fortran/error.c's error_print - missing "break" ? burnus at gcc dot gnu dot org
2009-04-07 9:24 ` [Bug fortran/39576] " pault at gcc dot gnu dot org
@ 2009-05-05 8:30 ` fxcoudert at gcc dot gnu dot org
2009-05-07 22:02 ` fxcoudert at gcc dot gnu dot org
2009-05-07 22:02 ` fxcoudert at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2009-05-05 8:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from fxcoudert at gcc dot gnu dot org 2009-05-05 08:30 -------
I can confirm it's missing a break:
Index: error.c
===================================================================
--- error.c (revision 147105)
+++ error.c (working copy)
@@ -533,6 +533,7 @@
case 'u':
arg[pos].type = TYPE_UINTEGER;
+ break;
case 'l':
c = *format++;
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |fxcoudert at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Keywords|wrong-code |diagnostic, patch
Last reconfirmed|2009-04-07 09:23:55 |2009-05-05 08:30:24
date| |
Summary|gcc/fortran/error.c's |gcc/fortran/error.c's
|error_print - missing |error.c missing "break"
|"break" ? |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39576
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/39576] gcc/fortran/error.c's error.c missing "break"
2009-03-29 9:30 [Bug fortran/39576] New: gcc/fortran/error.c's error_print - missing "break" ? burnus at gcc dot gnu dot org
` (2 preceding siblings ...)
2009-05-07 22:02 ` fxcoudert at gcc dot gnu dot org
@ 2009-05-07 22:02 ` fxcoudert at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2009-05-07 22:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from fxcoudert at gcc dot gnu dot org 2009-05-07 22:01 -------
Subject: Bug 39576
Author: fxcoudert
Date: Thu May 7 22:01:34 2009
New Revision: 147257
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=147257
Log:
PR fortran/39576
* error.c (error_print): Add missing break statement.
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/error.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39576
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/39576] gcc/fortran/error.c's error.c missing "break"
2009-03-29 9:30 [Bug fortran/39576] New: gcc/fortran/error.c's error_print - missing "break" ? burnus at gcc dot gnu dot org
2009-04-07 9:24 ` [Bug fortran/39576] " pault at gcc dot gnu dot org
2009-05-05 8:30 ` [Bug fortran/39576] gcc/fortran/error.c's error.c missing "break" fxcoudert at gcc dot gnu dot org
@ 2009-05-07 22:02 ` fxcoudert at gcc dot gnu dot org
2009-05-07 22:02 ` fxcoudert at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2009-05-07 22:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from fxcoudert at gcc dot gnu dot org 2009-05-07 22:02 -------
Fixed.
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39576
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-05-07 22:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-29 9:30 [Bug fortran/39576] New: gcc/fortran/error.c's error_print - missing "break" ? burnus at gcc dot gnu dot org
2009-04-07 9:24 ` [Bug fortran/39576] " pault at gcc dot gnu dot org
2009-05-05 8:30 ` [Bug fortran/39576] gcc/fortran/error.c's error.c missing "break" fxcoudert at gcc dot gnu dot org
2009-05-07 22:02 ` fxcoudert at gcc dot gnu dot org
2009-05-07 22:02 ` fxcoudert at gcc dot gnu dot 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).