This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Hello all,
I use gcc which was configured for Mitsubishi m32r.
I found that gcc generate wrong code, which compiled with -O2.
Without Optimization, gcc generates code, correctly.
------ system ------
FreeBSD 4.5-RELEASE
- gcc configuration -
Configured with: ../gcc-3.2.2/configure --target=m32r-unknown-elf
--with-gnu-as --with-gnu-ld --enable-languages=c
Thread model: single
gcc version 3.2.2
--------------------
Sample source code.
---- m32r_bug.c ----
static int f( int a )
{
int b;
b = 0;
if (a != 0) b = 1;
return b;
}
--------------------
./xgcc -B./ -O2 -S m32r_bug.c -o m32r_bug.s
--------------------
Output code.
---- m32r_bug.s ----
.section .text
.balign 4
.type f,@function
f:
; PROLOGUE, vars= 0, regs= 0, args= 0, extra= 0
addi r0,#0
; EPILOGUE
jmp lr
.Lfe1:
.size f,.Lfe1-f
.ident "GCC: (GNU) 3.2.2"
--------------------
Is there a patch for this problem?
---
There is Another problem.
When gcc compiles a large size c source code,
gcc acts something wrong.
But, I have not sample now.
thanks for any help
tanaka
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe at sources dot redhat dot com
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |