Bug 6038 - [gas patch] xtensa: fix compile failure with gcc 4.3
Summary: [gas patch] xtensa: fix compile failure with gcc 4.3
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: gas (show other bugs)
Version: 2.19
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-04 21:17 UTC by Adrian Bunk
Modified: 2008-04-08 18:02 UTC (History)
1 user (show)

See Also:
Host:
Target: xtensa-unknown-linux-gnu
Build:
Last reconfirmed:


Attachments
gas/config/tc-xtensa.c:xg_apply_fix_value(): terminate with as_fatal() if decode_reloc() returns an error (284 bytes, patch)
2008-04-04 21:19 UTC, Adrian Bunk
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Bunk 2008-04-04 21:17:44 UTC
gcc 4.3 can't prove that decode_reloc() always succeeds here, and therefore
emits the following warnings that are due to -Werror treated as errors:

<--  snip  -->

...
gcc -DHAVE_CONFIG_H -I. -I/TMP/binutils-2.18.50.0.6/gas -I. -I.
-I/TMP/binutils-2.18.50.0.6/gas -I../bfd -I/TMP/binutils-2.18.50.0.6/gas/config
-I/TMP/binutils-2.18.50.0.6/gas/../include -I/TMP/binutils-2.18.50.0.6/gas/..
-I/TMP/binutils-2.18.50.0.6/gas/../bfd
-DLOCALEDIR="\"/usr/local/DIR/binutils-xtensa-2.18.50.0.6/share/locale\""   -W
-Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -O2 -march=k8 -c
/TMP/binutils-2.18.50.0.6/gas/config/tc-xtensa.c
cc1: warnings being treated as errors
/TMP/binutils-2.18.50.0.6/gas/config/tc-xtensa.c: In function ‘xg_apply_fix_value’:
/TMP/binutils-2.18.50.0.6/gas/config/tc-xtensa.c:4973: error: ‘alt_reloc’ may be
used uninitialized in this function
/TMP/binutils-2.18.50.0.6/gas/config/tc-xtensa.c:4967: error: ‘slot’ may be used
uninitialized in this function
make[4]: *** [tc-xtensa.o] Error 1
make[4]: Leaving directory `/tmp/build-binutils-2.18.50.0.6-xtensa/gas'

<--  snip  -->
Comment 1 Adrian Bunk 2008-04-04 21:19:39 UTC
Created attachment 2354 [details]
gas/config/tc-xtensa.c:xg_apply_fix_value(): terminate with as_fatal() if decode_reloc() returns an error
Comment 2 H.J. Lu 2008-04-08 18:02:33 UTC
Fixed by

http://sourceware.org/ml/binutils/2008-04/msg00069.html