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/36845] New: The compiler fails to build the support libraries and generates incorrect code for a target


With multilib enabled when building libgcc for avr35, the compiler generates
instructions that are illegal on that target (movw) and fails, failing the
whole installation process.

To reproduce the bug:

$ ../gcc-4.3.1/configure --target=avr-elf --disable-libada --disable-libssp
--enable-languages=c
$ make

... lots of output, then, when compiling _mulsi3:

../../../../gcc-4.3.1/libgcc/../gcc/config/avr/libgcc.S: Assembler messages:
../../../../gcc-4.3.1/libgcc/../gcc/config/avr/libgcc.S:281: Error: illegal
opcode movw for mcu avr3
../../../../gcc-4.3.1/libgcc/../gcc/config/avr/libgcc.S:283: Error: illegal
opcode movw for mcu avr3
make[4]: *** [_mulsi3.o] Error 1

and the build process stops.

Quick tests show that the generated crosscompiler avoids movw when compiling to
avr3 but generates it when compiling for avr35. The following function can be
used to demonstrate it:

int foo( int a, int *p ) { return a + *p; }

and then:

$ xgcc -O3 -mmcu=avr35 -c foo.c
/tmp/cc0IiYn4.s: Assembler messages:
/tmp/cc0IiYn4.s:15: Error: illegal opcode movw for mcu avr3
/tmp/cc0IiYn4.s:20: Error: illegal opcode movw for mcu avr3


-- 
           Summary: The compiler fails to build the support libraries and
                    generates incorrect code for a target
           Product: gcc
           Version: 4.3.1
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: zoltan at bendor dot com dot au
 GCC build triplet: x86-linux-elf
  GCC host triplet: x86-linux-elf
GCC target triplet: avr-unknown-elf


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


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