public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/64327] New: ../../gcc/gcc/rtlanal.c:4881:48: runtime error: shift exponent 4294967295 is too large for 64-bit type 'long unsigned int'
@ 2014-12-16  8:49 trippels at gcc dot gnu.org
  2014-12-17 13:11 ` [Bug middle-end/64327] " mpolacek at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-12-16  8:49 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64327

            Bug ID: 64327
           Summary: ../../gcc/gcc/rtlanal.c:4881:48: runtime error: shift
                    exponent 4294967295 is too large for 64-bit type 'long
                    unsigned int'
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: trippels at gcc dot gnu.org
                CC: dmalcolm at gcc dot gnu.org

Running bootstrap-ubsan on x86_64 shows many instances of:

../../gcc/gcc/rtlanal.c:4881:48: runtime error: shift exponent 4294967295 is
too large for 64-bit type 'long unsigned int'


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug middle-end/64327] ../../gcc/gcc/rtlanal.c:4881:48: runtime error: shift exponent 4294967295 is too large for 64-bit type 'long unsigned int'
  2014-12-16  8:49 [Bug middle-end/64327] New: ../../gcc/gcc/rtlanal.c:4881:48: runtime error: shift exponent 4294967295 is too large for 64-bit type 'long unsigned int' trippels at gcc dot gnu.org
@ 2014-12-17 13:11 ` mpolacek at gcc dot gnu.org
  2015-07-13  7:45 ` zeccav at gmail dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-12-17 13:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64327

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-12-17
                 CC|                            |mpolacek at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
I see that too.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug middle-end/64327] ../../gcc/gcc/rtlanal.c:4881:48: runtime error: shift exponent 4294967295 is too large for 64-bit type 'long unsigned int'
  2014-12-16  8:49 [Bug middle-end/64327] New: ../../gcc/gcc/rtlanal.c:4881:48: runtime error: shift exponent 4294967295 is too large for 64-bit type 'long unsigned int' trippels at gcc dot gnu.org
  2014-12-17 13:11 ` [Bug middle-end/64327] " mpolacek at gcc dot gnu.org
@ 2015-07-13  7:45 ` zeccav at gmail dot com
  2015-07-13  7:50 ` trippels at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: zeccav at gmail dot com @ 2015-07-13  7:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64327

Vittorio Zecca <zeccav at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zeccav at gmail dot com

--- Comment #2 from Vittorio Zecca <zeccav at gmail dot com> ---
Please see bug 66853, it appears to duplicate this one.
With a small reproducer included.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug middle-end/64327] ../../gcc/gcc/rtlanal.c:4881:48: runtime error: shift exponent 4294967295 is too large for 64-bit type 'long unsigned int'
  2014-12-16  8:49 [Bug middle-end/64327] New: ../../gcc/gcc/rtlanal.c:4881:48: runtime error: shift exponent 4294967295 is too large for 64-bit type 'long unsigned int' trippels at gcc dot gnu.org
  2014-12-17 13:11 ` [Bug middle-end/64327] " mpolacek at gcc dot gnu.org
  2015-07-13  7:45 ` zeccav at gmail dot com
@ 2015-07-13  7:50 ` trippels at gcc dot gnu.org
  2015-07-14  7:36 ` zeccav at gmail dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-07-13  7:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64327

--- Comment #3 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
*** Bug 66853 has been marked as a duplicate of this bug. ***


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug middle-end/64327] ../../gcc/gcc/rtlanal.c:4881:48: runtime error: shift exponent 4294967295 is too large for 64-bit type 'long unsigned int'
  2014-12-16  8:49 [Bug middle-end/64327] New: ../../gcc/gcc/rtlanal.c:4881:48: runtime error: shift exponent 4294967295 is too large for 64-bit type 'long unsigned int' trippels at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2015-07-13  7:50 ` trippels at gcc dot gnu.org
@ 2015-07-14  7:36 ` zeccav at gmail dot com
  2015-07-20  5:20 ` zeccav at gmail dot com
  2015-08-23  5:31 ` zeccav at gmail dot com
  5 siblings, 0 replies; 7+ messages in thread
From: zeccav at gmail dot com @ 2015-07-14  7:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64327

--- Comment #4 from Vittorio Zecca <zeccav at gmail dot com> ---
For your convenience I repeat here the reproducer:
/* from gcc file fixopts.c */
/* must be compiled with -O2 */
/*gcc-5.1.0/gcc/rtlanal.c:4911:48: runtime error: shift exponent
4294967295 is too large for 64-bit type 'long unsigned int'*/
/*on source line "return nonzero & ((unsigned HOST_WIDE_INT) 1 <<
(bitwidth - 1))"*/
/* because unsigned int bitwidth is zero and bitwitdth-1 is 4294967295
on my x86-64 */
/* I did double check with:
 *   bitwidth = GET_MODE_PRECISION (mode);
 *   gcc_assert(bitwidth);
*/
/* the bug appears compiling fixopts.c crc32.c md5.c and many Fedora
21 kernel files*/
/* 66853 duplicato di 64327 */
int strcmp(const char *s1, const char *s2);
int  fixinc_mode; /* must be outside main for bug to appear */
int main (void)
{
 const char *pz;
 if (strcmp (pz, "true") ) fixinc_mode = 0;
}


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug middle-end/64327] ../../gcc/gcc/rtlanal.c:4881:48: runtime error: shift exponent 4294967295 is too large for 64-bit type 'long unsigned int'
  2014-12-16  8:49 [Bug middle-end/64327] New: ../../gcc/gcc/rtlanal.c:4881:48: runtime error: shift exponent 4294967295 is too large for 64-bit type 'long unsigned int' trippels at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2015-07-14  7:36 ` zeccav at gmail dot com
@ 2015-07-20  5:20 ` zeccav at gmail dot com
  2015-08-23  5:31 ` zeccav at gmail dot com
  5 siblings, 0 replies; 7+ messages in thread
From: zeccav at gmail dot com @ 2015-07-20  5:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64327

--- Comment #5 from Vittorio Zecca <zeccav at gmail dot com> ---
In 5.2.0 too.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug middle-end/64327] ../../gcc/gcc/rtlanal.c:4881:48: runtime error: shift exponent 4294967295 is too large for 64-bit type 'long unsigned int'
  2014-12-16  8:49 [Bug middle-end/64327] New: ../../gcc/gcc/rtlanal.c:4881:48: runtime error: shift exponent 4294967295 is too large for 64-bit type 'long unsigned int' trippels at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2015-07-20  5:20 ` zeccav at gmail dot com
@ 2015-08-23  5:31 ` zeccav at gmail dot com
  5 siblings, 0 replies; 7+ messages in thread
From: zeccav at gmail dot com @ 2015-08-23  5:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64327

--- Comment #6 from Vittorio Zecca <zeccav at gmail dot com> ---
I "fixed" this one by substituting rtlanal.c:4907

if (bitwidth > HOST_BITS_PER_WIDE_INT )

with

if (bitwidth > HOST_BITS_PER_WIDE_INT || !bitwidth)


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-08-23  5:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-16  8:49 [Bug middle-end/64327] New: ../../gcc/gcc/rtlanal.c:4881:48: runtime error: shift exponent 4294967295 is too large for 64-bit type 'long unsigned int' trippels at gcc dot gnu.org
2014-12-17 13:11 ` [Bug middle-end/64327] " mpolacek at gcc dot gnu.org
2015-07-13  7:45 ` zeccav at gmail dot com
2015-07-13  7:50 ` trippels at gcc dot gnu.org
2015-07-14  7:36 ` zeccav at gmail dot com
2015-07-20  5:20 ` zeccav at gmail dot com
2015-08-23  5:31 ` zeccav at gmail dot com

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).