public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/54436] New: Compiling some regular C++ code gives assembler '700415 shortened to 255' warning
@ 2012-08-31 12:09 mathias at gaunard dot com
  2012-08-31 12:43 ` [Bug other/54436] [4.7/4.8 Regression] " jakub at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: mathias at gaunard dot com @ 2012-08-31 12:09 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54436

             Bug #: 54436
           Summary: Compiling some regular C++ code gives assembler
                    '700415 shortened to 255' warning
    Classification: Unclassified
           Product: gcc
           Version: 4.7.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: mathias@gaunard.com


Created attachment 28110
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28110
automatically reduced testcase

When I compile the attached C++ code with GCC 4.7 and GNU as 2.22 with -O1, I
get the following message:
$ g++ -O1 -c reversebits.ii
/tmp/cchfvrG0.s: Assembler messages:
/tmp/cchfvrG0.s:40: Warning: 700415 shortened to 255

I do not think it is normal that GCC does not report any problem while the
assembler does.

The attached testcase was unfortunately automatically reduced from a large code
base, so it isn't very readable. Sorry about that.
I also do not know what is the right component, so putting in 'other' for now.


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

* [Bug other/54436] [4.7/4.8 Regression] Compiling some regular C++ code gives assembler '700415 shortened to 255' warning
  2012-08-31 12:09 [Bug other/54436] New: Compiling some regular C++ code gives assembler '700415 shortened to 255' warning mathias at gaunard dot com
@ 2012-08-31 12:43 ` jakub at gcc dot gnu.org
  2012-08-31 16:42 ` [Bug target/54436] " jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-08-31 12:43 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54436

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-08-31
                 CC|                            |jakub at gcc dot gnu.org
   Target Milestone|---                         |4.7.2
            Summary|Compiling some regular C++  |[4.7/4.8 Regression]
                   |code gives assembler        |Compiling some regular C++
                   |'700415 shortened to 255'   |code gives assembler
                   |warning                     |'700415 shortened to 255'
                   |                            |warning
     Ever Confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-08-31 12:42:37 UTC ---
Started with http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179556
Looking into it.


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

* [Bug target/54436] [4.7/4.8 Regression] Compiling some regular C++ code gives assembler '700415 shortened to 255' warning
  2012-08-31 12:09 [Bug other/54436] New: Compiling some regular C++ code gives assembler '700415 shortened to 255' warning mathias at gaunard dot com
  2012-08-31 12:43 ` [Bug other/54436] [4.7/4.8 Regression] " jakub at gcc dot gnu.org
@ 2012-08-31 16:42 ` jakub at gcc dot gnu.org
  2012-09-01  1:23 ` mathias at gaunard dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-08-31 16:42 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54436

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |jakub at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-08-31 16:42:17 UTC ---
Created attachment 28112
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28112
gcc48-pr54436.patch

Untested fix.


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

* [Bug target/54436] [4.7/4.8 Regression] Compiling some regular C++ code gives assembler '700415 shortened to 255' warning
  2012-08-31 12:09 [Bug other/54436] New: Compiling some regular C++ code gives assembler '700415 shortened to 255' warning mathias at gaunard dot com
  2012-08-31 12:43 ` [Bug other/54436] [4.7/4.8 Regression] " jakub at gcc dot gnu.org
  2012-08-31 16:42 ` [Bug target/54436] " jakub at gcc dot gnu.org
@ 2012-09-01  1:23 ` mathias at gaunard dot com
  2012-09-01 19:09 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: mathias at gaunard dot com @ 2012-09-01  1:23 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54436

--- Comment #3 from Mathias Gaunard <mathias at gaunard dot com> 2012-09-01 01:23:04 UTC ---
While a warning is emitted, is the code in the end still valid or is that a
miscompilation?


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

* [Bug target/54436] [4.7/4.8 Regression] Compiling some regular C++ code gives assembler '700415 shortened to 255' warning
  2012-08-31 12:09 [Bug other/54436] New: Compiling some regular C++ code gives assembler '700415 shortened to 255' warning mathias at gaunard dot com
                   ` (2 preceding siblings ...)
  2012-09-01  1:23 ` mathias at gaunard dot com
@ 2012-09-01 19:09 ` jakub at gcc dot gnu.org
  2012-09-03 16:06 ` jakub at gcc dot gnu.org
  2012-09-03 16:09 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-01 19:09 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54436

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-01 19:09:05 UTC ---
Author: jakub
Date: Sat Sep  1 19:09:02 2012
New Revision: 190849

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190849
Log:
    PR target/54436
    * config/i386/i386.md (*mov<mode>_insv_1_rex64, *movsi_insv_1): If
    operands[1] is CONST_INT_P, convert it to QImode before printing.

    * gcc.dg/torture/pr54436.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/torture/pr54436.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.md
    trunk/gcc/testsuite/ChangeLog


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

* [Bug target/54436] [4.7/4.8 Regression] Compiling some regular C++ code gives assembler '700415 shortened to 255' warning
  2012-08-31 12:09 [Bug other/54436] New: Compiling some regular C++ code gives assembler '700415 shortened to 255' warning mathias at gaunard dot com
                   ` (3 preceding siblings ...)
  2012-09-01 19:09 ` jakub at gcc dot gnu.org
@ 2012-09-03 16:06 ` jakub at gcc dot gnu.org
  2012-09-03 16:09 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-03 16:06 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54436

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-03 16:05:50 UTC ---
Author: jakub
Date: Mon Sep  3 16:05:44 2012
New Revision: 190900

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190900
Log:
    Backported from mainline
    2012-09-01  Jakub Jelinek  <jakub@redhat.com>

    PR target/54436
    * config/i386/i386.md (*mov<mode>_insv_1_rex64, *movsi_insv_1): If
    operands[1] is CONST_INT_P, convert it to QImode before printing.

    * gcc.dg/torture/pr54436.c: New test.

Added:
    branches/gcc-4_7-branch/gcc/testsuite/gcc.dg/torture/pr54436.c
Modified:
    branches/gcc-4_7-branch/gcc/ChangeLog
    branches/gcc-4_7-branch/gcc/config/i386/i386.md
    branches/gcc-4_7-branch/gcc/testsuite/ChangeLog


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

* [Bug target/54436] [4.7/4.8 Regression] Compiling some regular C++ code gives assembler '700415 shortened to 255' warning
  2012-08-31 12:09 [Bug other/54436] New: Compiling some regular C++ code gives assembler '700415 shortened to 255' warning mathias at gaunard dot com
                   ` (4 preceding siblings ...)
  2012-09-03 16:06 ` jakub at gcc dot gnu.org
@ 2012-09-03 16:09 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-03 16:09 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54436

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-03 16:09:10 UTC ---
Fixed.  Without the fix you get the assembler warning, but that should be
harmless, as the assembler should truncate the value to the 8-bit value anyway,
what the compiler does with the fix previously did the assembler after issuing
the warning.


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

end of thread, other threads:[~2012-09-03 16:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-31 12:09 [Bug other/54436] New: Compiling some regular C++ code gives assembler '700415 shortened to 255' warning mathias at gaunard dot com
2012-08-31 12:43 ` [Bug other/54436] [4.7/4.8 Regression] " jakub at gcc dot gnu.org
2012-08-31 16:42 ` [Bug target/54436] " jakub at gcc dot gnu.org
2012-09-01  1:23 ` mathias at gaunard dot com
2012-09-01 19:09 ` jakub at gcc dot gnu.org
2012-09-03 16:06 ` jakub at gcc dot gnu.org
2012-09-03 16:09 ` 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).