[Bug bootstrap/34189] New: Kernel hangs while booting when compiled with gcc-4.3 snapshot.
Hello all, I have successfully built SH4-Linux toolchain based on (binutils-2.17.50, gcc-4.3-20071012, glibc-2.6) for Renesas SH target I am facing problem while booting the Linux kernel on SH target. Targets Used for Testing: SH7751R2D+ and SH7780 Highlander RP I have successfully compiled Linux kernel using toolchain but kernel hangs after following message: Disk drive detected: TOSHIBA THNCF128MMG 3.10 STCB21M85008B24183C8 Set Transfer Mode result: 51 Initialize Device Parameters result: 50 IDLE result: 50 LILO boot: first-image Loading linuxdone. It is not even printing the banner of the kernel. The same kernel when compiled with gcc-4.2.1 based toolchain, it boots successfully on the target hardware Any help on this will be highly appreciated. Regards, Ashay Jaiswal KPIT Cummins Infosystems Ltd, Pune (INDIA) ~~ Free download of GNU based SH-Linux toolchains for Renesas' SHSeries. The following site also offers free technical support to its users. Visit http://www.kpitgnutools.com for details. Latest versions of KPIT GNU SH-Linux tools were released on October 19, 2007. ~~ -- Summary: Kernel hangs while booting when compiled with gcc-4.3 snapshot. Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: Ashay dot Jaiswal at kpitcummins dot com GCC build triplet: i686-pc-linux GCC host triplet: sh4-unknown-linux GCC target triplet: sh4-unknown-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34189
[Bug target/34189] Kernel hangs while booting when compiled with gcc-4.3 snapshot.
--- Comment #2 from Ashay dot Jaiswal at kpitcummins dot com 2007-11-23 05:11 --- (In reply to comment #1) We need a testcase to do anything about this. I have tested on released Linux kernel version 2.6.22.1 and kernel version 2.6.23.1 both hangs while booting, but boots successfully when cross compiled with gcc-4.2.1 based toolchain. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34189
[Bug c++/31948] New: SH- Mathematical Error handling is no working for valid code
Hello all, I have successfully built SH4-Linux toolchain based on (binutils-2.17, gcc-4.2-20061205, glibc-2.5) for Renesas SH target. I am facing problem while executing the following C++ program. -- #include stdio.h #include cmath #include cerrno double value; int main( void ) { value = sqrt(-1.2); if (errno != EDOM) { printf(sqrt: GOT %f\n, value); } } -- The above program compiles successfully with the sh4-linux toolchain. While executing on target platform sqrt function is returning nan but errno variable is not set to EDOM. Command: sh4-linux-gcc name {here default target is m4} Observations: 1. When the above program is compiled with -m4-nofpu target option or with any other FPU less target option program executes successfully and the errno variable is set to EDOM. Command: sh4-linux-gcc -m4-nofpu name Is there any relation with the target processor (i.e. floating point unit processor or non - floating point unit processor)? Because the only difference between success and failure condition in our case is the target switch we are specifying (m4-nofpu or m4 respectively ). Any help on this will be appreciated. Regards, Ashay Jaiswal KPIT Cummins Infosystems Ltd, Pune (INDIA) ~~ Free download of GNU based SH-Linux toolchains for Renesas' SH Series. The following site also offers free technical support to its users. Visit http://www.kpitgnutools.com for details. Latest versions of KPIT GNU SH-Linux tools were released on April 5, 2007. ~ -- Summary: SH- Mathematical Error handling is no working for valid code Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: major Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: Ashay dot Jaiswal at kpitcummins dot com GCC build triplet: i686-pc-linux GCC host triplet: sh4-unknown-linux GCC target triplet: sh4-unknown-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31948
[Bug c/31949] New: SH- Aliasing problem for incompatible pointers in c code
Hello all, I have successfully built SH4-Linux toolchain based on (binutils-2.17, gcc-4.2-20061205, glibc-2.5) for Renesas SH target. I am facing problem while executing the following C program. -- #include stdio.h struct structB { int x; int y; }; struct structC { int x; int y; }; main() { struct structC varCs, *varCp=varCs, **varCpp=varCp; struct structB *varBp; varCs.x = 10; varCs.y = 20; varBp = *((struct structB **)varCpp); varBp-x = varBp-y; printf(%d,varCs.x); } -- The above program compiles successfully with the sh4-linux toolchain. While executing on target platform it is generating wrong result. Observations: 1. When the above program is compiled with '-O0' optimization the value of varCs.x is printed as 20, which is the expected output. Command: sh4-linux-gcc file name 2. When the above program is compiled with '-O2' optimization the program is giving following errors: a) Bus error when executed on SH7780 Highlander board. b) Killing process due to unaligned access in user space when executed on SH7751 R2D board. Command: sh4-linux-gcc -O2 file name 3. When the above program is compiled with '-O2' and '-fno-strict-aliasing' option the value of varCs.x is printed as 20. Command: sh4-linux-gcc -O2 -fno-strict-aliasing file name Is the above problem related to strict aliasing ? As with 'fno-strict-aliasing' option the above code works fine. Any help on this will be appreciated. Regards, Ashay Jaiswal KPIT Cummins Infosystems Ltd, Pune (INDIA) ~~ Free download of GNU based SH-Linux toolchains for Renesas' SH Series. The following site also offers free technical support to its users. Visit http://www.kpitgnutools.com for details. Latest versions of KPIT GNU SH-Linux tools were released on April 5, 2007. ~ -- Summary: SH- Aliasing problem for incompatible pointers in c code Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: major Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: Ashay dot Jaiswal at kpitcummins dot com GCC build triplet: i686-pc-gnu GCC host triplet: sh4-unknown-linux GCC target triplet: sh4-unknown-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31949
[Bug c/31701] New: Program giving segmentation fault with '-O2' optimization.
Hello all, I have successfully built SH4-Linux toolchain based on (binutils-2.17, gcc-4.2-20061205, glibc-2.5) for Renesas SH target. I am facing problem while executing the following program. -- #include stdio.h extern void func(); typedef struct abc { char name[16]; }ABC; main() { int i; ABC buffer[20]; for (i=0; i20; i++) buffer[i].name[0] = 't'; if (buffer[10].name[0] == 't') printf(OK\n); else printf(NOT OK\n); } - The above program when compiled with '-O0' optimization executes successfully, but I am getting segmentation fault error while executing the program compiled with '-O2' optimization. Observations: 1. I found differences in the assembly output of the program when compiled with '-O0' and '-O2' optimization. It seems stack register get corrupted with '-O2' optimization. Following code corrupts the stack register L10: mov.w .L18,r14 mov.l .L19,r1 add r14,r14 mov r14,r15here it is corrupting the stack register mov.l @r15+,r14 jmp @r1 nop .align 1 2. Program executes successfully when compiled with '-O2' and '-fno-optimize-sibling-calls' options. 3. Same problem is encountered with gcc-4.0.1 and after reverting the patch PR21265(http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21265) the program executes successfully with '-O2' optimization. But this solution doesn't work with gcc-4.2-20061205 based toolchain. Any help on this will be appreciated. Regards, Ashay Jaiswal KPIT Cummins Infosystems Ltd, Pune (INDIA) ~~ Free download of GNU based SH-Linux toolchains for Renesas' SH Series. The following site also offers free technical support to its users. Visit http://www.kpitgnutools.com for details. Latest versions of KPIT GNU SH-Linux tools were released on April 5, 2007. ~~ -- Summary: Program giving segmentation fault with '-O2' optimization. Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: major Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: Ashay dot Jaiswal at kpitcummins dot com GCC build triplet: i686-pc-linux GCC host triplet: sh4-unknown-linux GCC target triplet: sh4-unknown-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31701