c++/9676: internal error in emit_move_insn for static cast of long double to unsigned long long

fonseca@mip.sdu.dk fonseca@mip.sdu.dk
Wed Feb 12 19:46:00 GMT 2003


>Number:         9676
>Category:       c++
>Synopsis:       internal error in emit_move_insn for static cast of long double to unsigned long long
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 12 19:46:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     fonseca@mip.sdu.dk
>Release:        Confirmed for GCC 3.1.1 and GCC 3.2
>Organization:
>Environment:
686 target.
>Description:
The program below fails to compile with GCC 3.2 (native compiler under x86 GNU/Linux) and GCC 3.1.1 (mingw32 cross compiler under SPARC Solaris).

Changes for GCC 3.2.2 does not seem to mention this problem.

Native GCC 3.2 compiler under x86 GNU/Linux yields:
g++ -O0 -march=i668 internal.cpp
internal.cpp: In function `int main()':
internal.cpp:6: Internal compiler error in emit_move_insn, at expr.c:2769


GCC 3.1.1 cross compiler for mingw32 target under SPARC Solaris yields:
i386-pc-mingw32-gcc -O0 -march=i686 internal.cpp
internal.cpp: In function `int main()':
internal.cpp:6: Internal compiler error in emit_move_insn, at expr.c:
   2769

The program only fails for GCC 3.1.1 if -march=i686 is set!



void myFunction(short) {
}

int main() {
  long double temp = 1;
  myFunction(static_cast<unsigned long long>(temp)); // ERR
  return 0;
}
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list