Bug#412617: marked as done (gcc-4.1: -O2 optimises away necessary code with no warning)
Your message dated Tue, 27 Feb 2007 10:03:42 +0100 with message-id <[EMAIL PROTECTED]> and subject line Bug#412617: gcc-4.1: -O2 optimises away necessary code with no warning has caused the attached Bug report to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what I am talking about this indicates a serious mail system misconfiguration somewhere. Please contact me immediately.) Debian bug tracking system administrator (administrator, Debian Bugs database) --- Begin Message --- Package: gcc-4.1 Version: 4.1.1-21 Severity: normal The below code should return a random number between 0 and 1, but does not do that when -O2 or higher is enabled. Uncomment the printf line to make the code work properly. Cheers, //Anders #include #include #include #include uint32_t rngi(uint32_t* ws) { /* Dummy code in place of more advanced RNG */ return rand() | ((rand() & 0x1)<<31); } static inline double rng(uint32_t* ws) { /* Create 53 bit random number */ uint64_t r = 0ULL; void* rp = &r; ((uint32_t*)rp)[1] = rngi(ws) >> 5; ((uint32_t*)rp)[0] = rngi(ws); r >>= 6ULL; // Uncomment this line to make the proram work properly //printf("0x%08X%08X\n", ((uint32_t*)rp)[1], ((uint32_t*)rp)[0]); /* Create double precision floating point random number in the range [0,1) The constant is generated as: uint64_t g = 0x0020ULL; printf("%0.24g \n",1.0/(*((double*)(&g; */ return *((double*)rp) * 2.24711641857789488466163e+307; } int main(void) { static uint32_t* ws = NULL; double r = rng(ws); printf("%g\n",r); return 0; } -- System Information: Debian Release: 4.0 APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.20 Locale: LANG=en_GB, LC_CTYPE=sv_SE (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C) Versions of packages gcc-4.1 depends on: ii binutils2.17-3 The GNU assembler, linker and bina ii cpp-4.1 4.1.1-21 The GNU C preprocessor ii gcc-4.1-base4.1.1-21 The GNU Compiler Collection (base ii libc6 2.3.6.ds1-11 GNU C Library: Shared libraries ii libgcc1 1:4.1.1-21 GCC support library ii libssp0 4.1.1-21 GCC stack smashing protection libr Versions of packages gcc-4.1 recommends: ii libc6-dev 2.3.6.ds1-11 GNU C Library: Development Librari pn libmudflap0-dev(no description available) -- no debconf information --- End Message --- --- Begin Message --- Anders Johansson <[EMAIL PROTECTED]> writes: > The below code should return a random number between 0 and 1, but does > not do that when -O2 or higher is enabled. Uncomment the printf line > to make the code work properly. [...] > uint64_t r = 0ULL; > void* rp = &r; > ((uint32_t*)rp)[1] = rngi(ws) >> 5; This code accesses a value of type uint64_t by an lvalue of type uint32_t. This is not allowed by C's aliasing rules. So the behavior is undefined, and this is not a bug in gcc. See the documentation of -fno-strict-aliasing. -- Falk --- End Message ---
Bug#410656: marked as done (gcc-4.1: Missing symbol `_Unwind_GetIPInfo' building with gcc -m32 on amd64.)
Your message dated Tue, 27 Feb 2007 11:25:45 + with message-id <[EMAIL PROTECTED]> and subject line Not a bug. has caused the attached Bug report to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what I am talking about this indicates a serious mail system misconfiguration somewhere. Please contact me immediately.) Debian bug tracking system administrator (administrator, Debian Bugs database) --- Begin Message --- Package: gcc-4.1 Version: 4.1.1-21 Severity: normal I'm trying to build the nspluginwrapper source on an amd64 machine. The x86_64 part builds okay, but when it goes to build the i386 runtime part with gcc -m32 the build is failing with the following error: $ make gcc -std=c99 -m32 -o npviewer.bin npviewer-npw-viewer.o npviewer-npw-rpc.o npviewer-rpc.o npviewer-debug.o npviewer-utils.o npviewer-npruntime.o npviewer-cxxabi-compat.o -m32 -Llsb-build-i386 -lgtk-x11-2.0 -lgdk-x11-2.0 -lgobject-2.0 -ldl -lglib-2.0 -lX11 -lXt -ldl -lpthread -Wl,--export-dynamic -Wl,--version-script,../src/npw-viewer.map -lsupc++ /usr/lib/gcc/x86_64-linux-gnu/4.1.2/32/libsupc++.a(eh_personality.o): In function `__gxx_personality_v0': (.text.__gxx_personality_v0+0xb8): undefined reference to `_Unwind_GetIPInfo' collect2: ld returned 1 exit status make: *** [npviewer.bin] Error 1 I've run through the list of gcc bugs and this is listed as a problem with gcc 4.2, but not with 4.1. (I've included the versions of the -i386 libc6 counterparts installed below) -- System Information: Debian Release: 4.0 APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.20 Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Versions of packages gcc-4.1 depends on: ii binutils2.17-3 The GNU assembler, linker and bina ii cpp-4.1 4.1.1-21 The GNU C preprocessor ii gcc-4.1-base4.1.1-21 The GNU Compiler Collection (base ii libc6 2.3.6.ds1-11 GNU C Library: Shared libraries ii libgcc1 1:4.1.1-21 GCC support library ii libssp0 4.1.1-21 GCC stack smashing protection libr ii libc6-i386 2.3.6.ds1-11 GNU C Library: 32bit shared librar Versions of packages gcc-4.1 recommends: ii libc6-dev 2.3.6.ds1-11 GNU C Library: Development Librari ii libmudflap0-dev 4.1.1-21 GCC mudflap support libraries (dev ii libc6-dev-i386 2.3.6.ds1-11 GNU C Library: 32bit development l -- no debconf information --- End Message --- --- Begin Message --- This was not a gcc bug. Closing. -- rob andrews :: pgp 0x01e00563 :: [EMAIL PROTECTED] --- End Message ---
I scriptural
Board said the wind, coupled with the pilot's inability to turn sharply, forced the Critical Care Inc, symbl: .CTCX. This one is an easy doubler @ 65 cents wont last long Expected target : $ 3.00 Critical Care Announces Expansion of Cost Containment Activities Business Wire (Fri, Feb 16) Critical Care to Acquire Health Care Company Business Wire (Wed, Jan 31) GET IN TOMORROW, This one is shoo in to DOUBLE Oyler "adamantly denies involvement in this fire and in any of these fires, -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]