This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/13313] New: Wrong code generated


When the following code is compiled
---------------------
# 1 "<built-in>"
# 1 "<command line>"
# 1 "test.c"

extern void DisplayNumber (unsigned long);
unsigned long ReadNumber ()
{
 return 8L;
}

void test_a (void)
{
 unsigned long tmp;
 tmp = (ReadNumber() & 0x00ff0000L) >> 16;
 DisplayNumber (tmp);
}
------------------------------------------

The code generated for the test_a function is incorrect.

The compiler is mainline CVS built on 20031127 

Compiler command line was 
h8300-hitachi-elf-gcc -v --save-temps -Wall -I include -Wa,-a=test.lst  -
gstabs -O1 -finline -c test.c

Compiler was configured as 
/home/administrator/h8-build/src2/configure --build=i686-pc-cygwin --host=i686-
pc-cygwin --target=h8300-hitachi-elf --with-included-gettext --disable-
libstdcxx_pch --enable-multilib

-- 
           Summary: Wrong code generated
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mike at ml-solutions dot co dot uk
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-cygwin
  GCC host triplet: i686-pc-cygwin
GCC target triplet: h8300-hitachi-elf


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]