This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 164805 - gcc -Os generates bad assembler code
gcc -Os generates bad assembler code
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: gcc (Show other bugs)
4.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On: 154116
Blocks: 156322
  Show dependency treegraph
 
Reported: 2005-08-01 12:04 EDT by Elena Zannoni
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version: RHBA-2005-677
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-10-05 07:18:10 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Elena Zannoni 2005-08-01 12:04:38 EDT
+++ This bug was initially created as a clone of Bug #154116 +++

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050323
Firefox/1.0.2 Fedora/1.0.2-1.3.1

Description of problem:
For the included example, gcc generates assembler code that makes the assembler
complain.  The assembler code uses an immediate value in a movb that does not
fit in a byte.  The original C code does not do this.

Version-Release number of selected component (if applicable):
gcc-3.4.2-6.fc3

How reproducible:
Always

Steps to Reproduce:
1. fetch attached file "gcc-inline-bad-byte.c"
2. gcc -Os -c gcc-inline-bad-byte.c
  

Actual Results:  /tmp/ccDdmcnm.s: Assembler messages:
/tmp/ccDdmcnm.s:9: Warning: 277 shortened to 21


Expected Results:  no error messages

Additional info:

This example is boiled down from driver code being developed by the ivtv project.
Without inlining, there is no bad assembler code (I presume that the resulting
code is correct, but I have not looked).
Comment 1 Tom Kincaid 2005-08-02 07:06:08 EDT
QE-ACK
Comment 2 Red Hat Bugzilla 2005-10-05 07:18:10 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2005-677.html

Note You need to log in before you can comment on or make changes to this bug.