[Bug libstdc++/40856] New: numeric_limits not specialized for __int128_t or __uint128_t

2009-07-25 Thread john dot salmon at deshaw dot com
salm...@drdblogin6.en.desres$ cat numeric128.cpp
#include 
#include 

int main(int argc, char **argv){
std::cout << "__int128_t is_specialized: " <<
std::numeric_limits<__int128_t>::is_specialized << "\n";
std::cout << "__uint128_t is_specialized: " <<
std::numeric_limits<__uint128_t>::is_specialized << "\n";
std::cout << "int is_specialized: " <<
std::numeric_limits::is_specialized << "\n";
return 0;
}
salm...@drdblogin6.en.desres$ desres-cleanenv -m gcc/4.4.1-13/bin g++
--std=gnu++0x numeric128.cpp
salm...@drdblogin6.en.desres$ a.out
__int128_t is_specialized: 0
__uint128_t is_specialized: 0
int is_specialized: 1
salm...@drdblogin6.en.desres$


-- 
   Summary: numeric_limits not specialized for __int128_t or
__uint128_t
   Product: gcc
   Version: 4.4.1
Status: UNCONFIRMED
  Severity: normal
      Priority: P3
         Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: john dot salmon at deshaw dot com


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



[Bug c++/40855] New: undefined reference to `typeinfo for __int128'

2009-07-24 Thread john dot salmon at deshaw dot com
When I try to take the typeid of an __int128_t or a __uint128_t, I get an
undefined reference at link time, e.g., with gcc/4.4.1:

salm...@drdblogin6.en.desres$ cat typeid.cpp
#include 

const std::type_info& ti(typeid(int)); // no problem
const std::type_info& ti128(typeid(__int128_t));
const std::type_info& tu128(typeid(__uint128_t));

int main(){}

salm...@drdblogin6.en.desres$ desres-cleanenv -m gcc/4.4.1-13/bin g++
-std=gnu++0x  typeid.cpp 
/tmp/ccKpEAiz.o:(.rodata+0x8): undefined reference to `typeinfo for __int128'
/tmp/ccKpEAiz.o:(.rodata+0x10): undefined reference to `typeinfo for unsigned
__int128'
collect2: ld returned 1 exit status
salm...@drdblogin6.en.desres$


-- 
   Summary: undefined reference to `typeinfo for __int128'
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
    ReportedBy: john dot salmon at deshaw dot com


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



[Bug c/31167] New: ICE wnen using __int128_t on x86_64

2007-03-13 Thread john dot salmon at deshaw dot com
The source below is meant to return an int32_t that is the result of "rounding"
the upper 32 bits of an __int128_t, where rounding pays attention to the bits
that have been discarded and the low bit of what is kept.  Since it's an ICE,
the details are probably irrelevant. 

[EMAIL PROTECTED] cat brokengcc.cxx
#include 

int32_t round32hi(const __int128_t &arg){
const int SHIFT = 96;
const int mshift = 96;
const __int128_t M = (~__int128_t(0))<>1;
const __int128_t Mlo = __int128_t(~M)>>1;
__int128_t vv = arg & M;
if( (arg & (L1))  // hi bit of discard set
&& ( (arg & Mlo)  // and ( any other bits of discard set
 || (arg & L) ) )   //   or lo bit of keep set )
vv += L;
return int32_t(vv>>SHIFT);
}
[EMAIL PROTECTED] gcc -v -c -O brokengcc.cxx
Reading specs from
/proj/desres/root/Linux/x86_64/gcc/4.1.2/lib/gcc/x86_64-unknown-linux-gnu/4.1.2/specs
Target: x86_64-unknown-linux-gnu
Configured with: /state/partition1/tmp/tmpwsa5nr/gcc-4.1.2/configure
--enable-languages=c,c++,fortran
--prefix=/proj/desres/root/Linux/x86_64/gcc/4.1.2
Thread model: posix
gcc version 4.1.2

/proj/desres/root/Linux/x86_64/gcc/4.1.2/libexec/gcc/x86_64-unknown-linux-gnu/4.1.2/cc1plus
-quiet -v -D_GNU_SOURCE brokengcc.cxx -quiet -dumpbase brokengcc.cxx -mtune=k8
-auxbase brokengcc -O -version -o /scratch/tmp/ccer1yVv.s
ignoring nonexistent directory
"/proj/desres/root/Linux/x86_64/gcc/4.1.2/lib/gcc/x86_64-unknown-linux-gnu/4.1.2/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:

/proj/desres/root/Linux/x86_64/gcc/4.1.2/lib/gcc/x86_64-unknown-linux-gnu/4.1.2/../../../../include/c++/4.1.2

/proj/desres/root/Linux/x86_64/gcc/4.1.2/lib/gcc/x86_64-unknown-linux-gnu/4.1.2/../../../../include/c++/4.1.2/x86_64-unknown-linux-gnu

/proj/desres/root/Linux/x86_64/gcc/4.1.2/lib/gcc/x86_64-unknown-linux-gnu/4.1.2/../../../../include/c++/4.1.2/backward
 /usr/local/include
 /proj/desres/root/Linux/x86_64/gcc/4.1.2/include

/proj/desres/root/Linux/x86_64/gcc/4.1.2/lib/gcc/x86_64-unknown-linux-gnu/4.1.2/include
 /usr/include
End of search list.
GNU C++ version 4.1.2 (x86_64-unknown-linux-gnu)
compiled by GNU C version 3.4.3 20041212 (Red Hat 3.4.3-9.EL4).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 9975ef1eec7edce53d85d34b86837808
brokengcc.cxx: In function 'int32_t round32hi(const __int128_t&)':
brokengcc.cxx:16: error: unrecognizable insn:
(insn 92 91 50 3 (parallel [
(set (reg:DI 38 r9 [ vv+8 ])
(plus:DI (plus:DI (ltu:DI (reg:CC 17 flags)
(const_int 0 [0x0]))
(reg:DI 38 r9 [ vv+8 ]))
(const_int 4294967296 [0x1])))
(clobber (reg:CC 17 flags))
]) -1 (nil)
(nil))
brokengcc.cxx:16: internal compiler error: in extract_insn, at recog.c:2084
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html> for instructions.
[EMAIL PROTECTED]


-- 
   Summary: ICE wnen using __int128_t on x86_64
   Product: gcc
   Version: 4.1.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
     Component: c
    AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: john dot salmon at deshaw dot com
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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