This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/43264] New: Arithmetic expression error
- From: "n-takeda at kwansei dot ac dot jp" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Mar 2010 04:16:46 -0000
- Subject: [Bug c/43264] New: Arithmetic expression error
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I use h8300-elf.
When this is executed, the value is 65536.
If there is optional optimization (-O1), the value is 0.
command
------------------------------------------------------
user@user-laptop:~/study$ /usr/local/gcc-4.4.3_h8300-elf/bin/h8300-elf-gcc
h8300_error.c
user@user-laptop:~/study$ /usr/local/gcc-4.4.3_h8300-elf/bin/h8300-elf-run
a.out
65536
user@user-laptop:~/study$ /usr/local/gcc-4.4.3_h8300-elf/bin/h8300-elf-gcc
h8300_error.c -O1
user@user-laptop:~/study$ /usr/local/gcc-4.4.3_h8300-elf/bin/h8300-elf-run
a.out
0
os
------------------------------------------------------
user@user-laptop:~/study$ uname -a
Linux user-laptop 2.6.27-17-generic #1 SMP Wed Jan 27 23:14:44 UTC 2010 i686
GNU/Linux
gcc version
------------------------------------------------------
user@user-laptop:~/study$ /usr/local/gcc-4.4.3_h8300-elf/bin/h8300-elf-gcc -v
Using built-in specs.
Target: h8300-elf
Configured with: ../gcc-4.4.3/configure --target=h8300-elf
--prefix=/usr/local/gcc-4.4.3_h8300-elf/ --disable-nls --enable-languages=c
--with-newlib
--with-headers=/home/user/build/gcc-4.4.3_h8300-elf/newlib-1.18.0/newlib/libc/include/
--with-gmp=/usr/local/gmp/4.3.1/ --with-mpfr=/usr/local/mpfr/2.4.2
Thread model: single
gcc version 4.4.3 (GCC)
--
Summary: Arithmetic expression error
Product: gcc
Version: 4.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: n-takeda at kwansei dot ac dot jp
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43264