public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/61910] New: undefined computation in trans-expr.c gfc_conv_cst_int_power
@ 2014-07-25 11:42 zeccav at gmail dot com
2014-08-02 15:27 ` [Bug fortran/61910] " dominiq at lps dot ens.fr
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: zeccav at gmail dot com @ 2014-07-25 11:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61910
Bug ID: 61910
Summary: undefined computation in trans-expr.c
gfc_conv_cst_int_power
Product: gcc
Version: 4.9.1
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: zeccav at gmail dot com
Analyzing with sanitized gfortran the following line
j=i**(-huge(0_8)-1)
I get the following message:
../../gcc-4.9.1/gcc/fortran/trans-expr.c:2107:48: runtime error:
negation of -9223372036854775808 cannot be represented in type 'long int';
cast to an unsigned type to negate this value to itself"
The offending line in trans-expr.c is
"n = (unsigned HOST_WIDE_INT) (m < 0 ? -m : m);"
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/61910] undefined computation in trans-expr.c gfc_conv_cst_int_power
2014-07-25 11:42 [Bug fortran/61910] New: undefined computation in trans-expr.c gfc_conv_cst_int_power zeccav at gmail dot com
@ 2014-08-02 15:27 ` dominiq at lps dot ens.fr
2014-08-05 4:22 ` zeccav at gmail dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-08-02 15:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61910
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2014-08-02
Ever confirmed|0 |1
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> Analyzing with sanitized gfortran the following line ...
I cannot reproduce it. Which options are you using? And does the message depend
on the value of i?
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/61910] undefined computation in trans-expr.c gfc_conv_cst_int_power
2014-07-25 11:42 [Bug fortran/61910] New: undefined computation in trans-expr.c gfc_conv_cst_int_power zeccav at gmail dot com
2014-08-02 15:27 ` [Bug fortran/61910] " dominiq at lps dot ens.fr
@ 2014-08-05 4:22 ` zeccav at gmail dot com
2014-09-04 10:13 ` mpolacek at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: zeccav at gmail dot com @ 2014-08-05 4:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61910
--- Comment #2 from Vittorio Zecca <zeccav at gmail dot com> ---
It appears not depending on i value, for i=1 or 2.
No explicit options used.
Of course I used options -fsanizitized=address -fsanitized=undefined
to generate gfortran.
I think it is either a gfortran or a sanitizer bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/61910] undefined computation in trans-expr.c gfc_conv_cst_int_power
2014-07-25 11:42 [Bug fortran/61910] New: undefined computation in trans-expr.c gfc_conv_cst_int_power zeccav at gmail dot com
2014-08-02 15:27 ` [Bug fortran/61910] " dominiq at lps dot ens.fr
2014-08-05 4:22 ` zeccav at gmail dot com
@ 2014-09-04 10:13 ` mpolacek at gcc dot gnu.org
2014-10-30 10:42 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-09-04 10:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61910
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
CC| |mpolacek at gcc dot gnu.org
Target Milestone|--- |4.9.2
--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Ok, I managed to whip up a complete testcase:
program test
integer i
integer j
j=i**(-huge(0_8)-1)
end program test
on this I see
$ ./xgcc -B./ -c x.f90
/home/polacek/src/gcc/gcc/fortran/trans-expr.c:2286:48: runtime error: negation
of -9223372036854775808 cannot be represented in type 'long int [3]'; cast to
an unsigned type to negate this value to itself
So confirmed.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/61910] undefined computation in trans-expr.c gfc_conv_cst_int_power
2014-07-25 11:42 [Bug fortran/61910] New: undefined computation in trans-expr.c gfc_conv_cst_int_power zeccav at gmail dot com
` (2 preceding siblings ...)
2014-09-04 10:13 ` mpolacek at gcc dot gnu.org
@ 2014-10-30 10:42 ` jakub at gcc dot gnu.org
2015-06-26 20:09 ` jakub at gcc dot gnu.org
2015-06-26 20:35 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-10-30 10:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61910
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.9.2 |4.9.3
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.9.2 has been released.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/61910] undefined computation in trans-expr.c gfc_conv_cst_int_power
2014-07-25 11:42 [Bug fortran/61910] New: undefined computation in trans-expr.c gfc_conv_cst_int_power zeccav at gmail dot com
` (3 preceding siblings ...)
2014-10-30 10:42 ` jakub at gcc dot gnu.org
@ 2015-06-26 20:09 ` jakub at gcc dot gnu.org
2015-06-26 20:35 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-06-26 20:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61910
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.9.3 has been released.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/61910] undefined computation in trans-expr.c gfc_conv_cst_int_power
2014-07-25 11:42 [Bug fortran/61910] New: undefined computation in trans-expr.c gfc_conv_cst_int_power zeccav at gmail dot com
` (4 preceding siblings ...)
2015-06-26 20:09 ` jakub at gcc dot gnu.org
@ 2015-06-26 20:35 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-06-26 20:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61910
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.9.3 |4.9.4
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-06-26 20:35 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-25 11:42 [Bug fortran/61910] New: undefined computation in trans-expr.c gfc_conv_cst_int_power zeccav at gmail dot com
2014-08-02 15:27 ` [Bug fortran/61910] " dominiq at lps dot ens.fr
2014-08-05 4:22 ` zeccav at gmail dot com
2014-09-04 10:13 ` mpolacek at gcc dot gnu.org
2014-10-30 10:42 ` jakub at gcc dot gnu.org
2015-06-26 20:09 ` jakub at gcc dot gnu.org
2015-06-26 20:35 ` jakub 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).