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



             Bug #: 55777

           Summary: Inlining nomips16 function into mips16 function can

                    result in undefined builtins

    Classification: Unclassified

           Product: gcc

           Version: 4.8.0

            Status: UNCONFIRMED

          Severity: normal

          Priority: P3

         Component: target

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: s...@gcc.gnu.org

            Target: mips*-*-*





While looking at the GCC testresults compiled with -mips16 I found that

gcc.target/mips/mips32-dsp-run.c failed.  Further investigation resulted

in this cutdown testcase:





long long a64_r;

unsigned int ui32_a, ui32_b;



__attribute__((nomips16)) int foo() {

a64_r = __builtin_mips_multu (ui32_a, ui32_b);

}



main ()

{

    foo();

}





Compiling with -O3 -mips16 results in:



gcc -mips16 -O3 builtin.c

/local/home/sellcey/nightly_full/install-mips-mti-elf/lib/gcc/mips-mti-elf/4.8.0/../../../../mips-mti-elf/bin/ld:

warning: cannot find entry symbol __start; defaulting to 0000000000400098

/tmp/ccrfai7t.o: In function `foo':

builtin.c:(.text+0x10): undefined reference to `__builtin_mips_multu'

collect2: error: ld returned 1 exit status



Inlining a function with the nomips16 attribute into a function that does

not have that attribute seems to be the cause of the problem.

Reply via email to