[Bug driver/18549] -save-temps option ends with corrupt object file

2004-12-06 Thread pschober at gmx dot ch

--- Additional Comments From pschober at gmx dot ch  2004-12-06 20:00 
---
Output with -v option :
Reading specs from C:\Programme\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\specs
Configured with: ../configure --prefix=/e/avrdev/install --target=avr
--enable-languages=c,c++ --disable-nls --enable-win32-registry=WinAVR
Thread model: single
gcc version 3.3.1
 C:\Programme\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\cc1.exe -E -quiet -v -iprefix
C:\Programme\WinAVR\bin/../lib/gcc-lib/avr\3.3.1\ -D__GNUC__=3
-D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=1 foo.c -mmcu=atmega16 foo.i
ignoring nonexistent directory C:/Programme/WinAVR/avr/sys-include
ignoring nonexistent directory /e/avrdev/install/include
ignoring nonexistant directory /e/avrdev/install/lib/gcc-lib/acr/3.3.1/include

ignoring nonexistant directory /e/avrdev/install/avr/sys-include
ignoring nonexistant directory /e/avrdev/install/avr/include
#include ... search starts here:
#include ... search starts here:
 C:/Programme/WinAVR/lib/gcc-lib/avr/3.3.1/include
 C:/Programme/WinAVR/avr/include
End of search list.
 C:\Programme\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\cc1.exe -fpreprocessed foo.i
-quiet -dumpbase foo.c -mmcu=atmega16 -auxbase foo -version -o foo.s
GNU C version 3.3.1 (avr)
compiled by GNU C version 3.2 (mingw special 20020817-1).
GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=131011
 C:\Programme\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\bin\as.exe
--traditional-format -mmcu=atmega16 -o foo.o 
C:\DOKUME~1\PS\LOKALE~1\Temp/ccSq.s

The only difference is the last line (C:\DOKUME~1\PS\LOKALE~1\Temp/ccSq.s)
It changes randomly , e.g. :
C:\DOKUME~1\PS\LOKALE~1\Temp/ccaA.s
C:\DOKUME~1\PS\LOKALE~1\Temp/ccmC.s
.
.
.


-- 


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


[Bug c/18549] New: -save-temps option ends with corrupt object file

2004-11-18 Thread pschober at gmx dot ch
if gcc is called with the -save-temps option the resulting object file is 
corrupt.
a call to the linker results in the following error message :
c:\programme\winavr\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr5\crtm16.o(.init9+0x0):undefined
reference to 'main'
without using the -save-temps option this error message doesn't appear.
if the file foo.s exists, the error doesn't appear as well (regardless of the
contents of foo.s);foo.s remains unchanged in this case

used calls :
avr-gcc -c -mmcu=atmega16 -save-temps foo.c
avr-gcc -mmcu=atmega16 -o foo.elf foo.o

this problem occurs on different versions (3.3.1, 3.4.1 tested) and on different
OS' (Windows 2000, Windows XP tested)

foo.c (works with other files as well) :
#include avr/io.h

int main(void)
{
 while (1);
}

-- 
   Summary: -save-temps option ends with corrupt object file
   Product: gcc
   Version: 3.3.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pschober at gmx dot ch
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: avr


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