bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/12494] New: Relaxation leads to wrong code optimization (c


From: avr at gjlay dot de
Subject: [Bug binutils/12494] New: Relaxation leads to wrong code optimization (computed goto)
Date: Wed, 16 Feb 2011 19:49:04 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=12494

           Summary: Relaxation leads to wrong code optimization (computed
                    goto)
           Product: binutils
           Version: 2.19
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
        AssignedTo: address@hidden
        ReportedBy: address@hidden
              Host: all
            Target: avr-elf
             Build: all


Created attachment 5247
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5247
GNU-C source using computed goto

The following GNU-C source uses computed goto in function fb. avr-gcc produces
correct code, but the relaxation optimizes rcall+ret to rkump even though
between rcall and ret there is a jump label.

Maybe someone can confirm with an up to date and unpatched version of binutils.

e:/WinAVR/20100110/bin/avr-gcc -Wl,--relax -v -Wl,-v -save-temps -fverbose-asm
-Wall -W -Os -o computed-goto.elf -mmcu=atmega8 computed-goto.c
Using built-in specs.
Target: avr
Configured with: ../gcc-4.3.3/configure --enable-win32-registry=WinAVR-20100110
--with-gmp=/usr/local --with-mpfr=/usr/local --prefix=/c/WinAVR --target=avr
--enable-languages=c,c++,objc --with-dwarf2 --enable-doc --disable-shared
--disable-libada --disable-libssp --disable-nls --with-pkgversion='WinAVR
20100110'
--with-bugurl='URL:http://sourceforge.net/tracker/?atid=520074&group_id=68108&func=browse'
Thread model: single
gcc version 4.3.3 (WinAVR 20100110) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-fverbose-asm' '-Wall' '-W' '-Os' '-o'
'computed-goto.elf' '-mmcu=atmega8'
 e:/winavr/20100110/bin/../libexec/gcc/avr/4.3.3/cc1.exe -E -quiet -v
-imultilib avr4 -iprefix e:\winavr\20100110\bin\../lib/gcc/avr/4.3.3/
computed-goto.c -mmcu=atmega8 -Wall -W -fverbose-asm -Os -fpch-preprocess -o
computed-goto.i
ignoring nonexistent directory
"e:/winavr/20100110/lib/gcc/../../avr/sys-include"
#include "..." search starts here:
#include <...> search starts here:
 e:\winavr\20100110\bin\../lib/gcc/avr/4.3.3/include
 e:\winavr\20100110\bin\../lib/gcc/avr/4.3.3/include-fixed
 e:/winavr/20100110/lib/gcc/../../lib/gcc/avr/4.3.3/include
 e:/winavr/20100110/lib/gcc/../../lib/gcc/avr/4.3.3/include-fixed
 e:/winavr/20100110/lib/gcc/../../avr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-fverbose-asm' '-Wall' '-W' '-Os' '-o'
'computed-goto.elf' '-mmcu=atmega8'
 e:/winavr/20100110/bin/../libexec/gcc/avr/4.3.3/cc1.exe -fpreprocessed
computed-goto.i -quiet -dumpbase computed-goto.c -mmcu=atmega8 -auxbase
computed-goto -Os -Wall -W -version -fverbose-asm -o computed-goto.s
GNU C (WinAVR 20100110) version 4.3.3 (avr)
    compiled by GNU C version 3.4.5 (mingw-vista special r3), GMP version
4.2.3, MPFR version 2.4.1.
GGC heuristics: --param ggc-min-expand=47 --param ggc-min-heapsize=32702
Compiler executable checksum: 61d68a374065d489330774d2533cbbdf
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-fverbose-asm' '-Wall' '-W' '-Os' '-o'
'computed-goto.elf' '-mmcu=atmega8'
 e:/winavr/20100110/bin/../lib/gcc/avr/4.3.3/../../../../avr/bin/as.exe
-mmcu=atmega8 -o computed-goto.o computed-goto.s
COMPILER_PATH=e:/winavr/20100110/bin/../libexec/gcc/avr/4.3.3/;e:/winavr/20100110/bin/../libexec/gcc/;e:/winavr/20100110/bin/../lib/gcc/avr/4.3.3/../../../../avr/bin/
LIBRARY_PATH=e:/winavr/20100110/bin/../lib/gcc/avr/4.3.3/avr4/;e:/winavr/20100110/bin/../lib/gcc/avr/4.3.3/../../../../avr/lib/avr4/;e:/winavr/20100110/bin/../lib/gcc/avr/4.3.3/;e:/winavr/20100110/bin/../lib/gcc/;e:/winavr/20100110/bin/../lib/gcc/avr/4.3.3/../../../../avr/lib/
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-fverbose-asm' '-Wall' '-W' '-Os' '-o'
'computed-goto.elf' '-mmcu=atmega8'
 e:/winavr/20100110/bin/../lib/gcc/avr/4.3.3/../../../../avr/bin/ld.exe -m avr4
-o computed-goto.elf
e:/winavr/20100110/bin/../lib/gcc/avr/4.3.3/../../../../avr/lib/avr4/crtm8.o
-Le:/winavr/20100110/bin/../lib/gcc/avr/4.3.3/avr4
-Le:/winavr/20100110/bin/../lib/gcc/avr/4.3.3/../../../../avr/lib/avr4
-Le:/winavr/20100110/bin/../lib/gcc/avr/4.3.3
-Le:/winavr/20100110/bin/../lib/gcc
-Le:/winavr/20100110/bin/../lib/gcc/avr/4.3.3/../../../../avr/lib --relax -v
computed-goto.o -lgcc -lc -lgcc
GNU ld (WinAVR 20100110) 2.19

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]