public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/19387] New: Fortran compiler tries to print HOST_WIDE_INT with %d format
@ 2005-01-11 23:37 sje at cup dot hp dot com
2005-01-12 1:43 ` [Bug fortran/19387] " pinskia at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: sje at cup dot hp dot com @ 2005-01-11 23:37 UTC (permalink / raw)
To: gcc-bugs
In trans-common.c there are two calls to gfc_warning that pass a HOST_WIDE_INT
variable and a %d format. The calls in question are in translate_common, where
we call gfc_warning with the variable 'offset' and again with the variable
'common_segment->offset'. This will not work when HOST_WIDE_INT is not the same
size as int. I tried replacing '%d' in the format with the macro
HOST_WIDE_INT_PRINT_DEC, which is defined in gcc/hwint.h but that failed because
the routine error_print in gcc/fortran/error.c parses the format string and
doesn't understand %ld or %lld.
Test case:
real r1(5)
common r1
double precision d1
equivalence (d1, r1(2))
end
Output during compile:
Warning: COMMON '__BLNK__' at (1) requires 1074534272 bytes of padding at start
--
Summary: Fortran compiler tries to print HOST_WIDE_INT with %d
format
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sje at cup dot hp dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19387
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/19387] Fortran compiler tries to print HOST_WIDE_INT with %d format
2005-01-11 23:37 [Bug fortran/19387] New: Fortran compiler tries to print HOST_WIDE_INT with %d format sje at cup dot hp dot com
@ 2005-01-12 1:43 ` pinskia at gcc dot gnu dot org
2005-01-14 23:08 ` pinskia at gcc dot gnu dot org
2005-04-11 0:38 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-12 1:43 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
GCC target triplet| |ia64-hp-hpux*
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19387
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/19387] Fortran compiler tries to print HOST_WIDE_INT with %d format
2005-01-11 23:37 [Bug fortran/19387] New: Fortran compiler tries to print HOST_WIDE_INT with %d format sje at cup dot hp dot com
2005-01-12 1:43 ` [Bug fortran/19387] " pinskia at gcc dot gnu dot org
@ 2005-01-14 23:08 ` pinskia at gcc dot gnu dot org
2005-04-11 0:38 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-14 23:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-14 23:08 -------
There are two ways to fix this, one way is to use gcc's diagnostic hooks (which is the long term fix).
Another way to fix this would be to make a new format for fortran's diagnostic functions which takes a
HOST_WIDE_INT and that will fix this problem very quickly and most likely can be done for 4.0.0.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |diagnostic
Last reconfirmed|0000-00-00 00:00:00 |2005-01-14 23:08:20
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19387
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/19387] Fortran compiler tries to print HOST_WIDE_INT with %d format
2005-01-11 23:37 [Bug fortran/19387] New: Fortran compiler tries to print HOST_WIDE_INT with %d format sje at cup dot hp dot com
2005-01-12 1:43 ` [Bug fortran/19387] " pinskia at gcc dot gnu dot org
2005-01-14 23:08 ` pinskia at gcc dot gnu dot org
@ 2005-04-11 0:38 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-11 0:38 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-11 00:38 -------
This actually can cause an ICE on some targets see PR 20059 which I am going to close this as a dup of
because there is a patch there already.
*** This bug has been marked as a duplicate of 20059 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19387
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-04-11 0:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-11 23:37 [Bug fortran/19387] New: Fortran compiler tries to print HOST_WIDE_INT with %d format sje at cup dot hp dot com
2005-01-12 1:43 ` [Bug fortran/19387] " pinskia at gcc dot gnu dot org
2005-01-14 23:08 ` pinskia at gcc dot gnu dot org
2005-04-11 0:38 ` pinskia 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).