[Bug c/39166] strlen() crashes with sigsegv on ubuntu 8.10

2009-02-12 Thread ajrobb at bigfoot dot com
--- Comment #3 from ajrobb at bigfoot dot com 2009-02-13 04:05 --- Many apologies. The bug was in line 66 of my code: should read: while (src < end && dst < lim) { This was polluting the stack - hardly surprising it crashed! -- ajrobb at bigfoot dot com changed:

[Bug c/39166] strlen() crashes with sigsegv on ubuntu 8.10

2009-02-12 Thread ajrobb at bigfoot dot com
--- Comment #2 from ajrobb at bigfoot dot com 2009-02-12 11:26 --- I have tested the assembler outputs from the two compilers. Both assembler files were generated with: gcc -g soundex.c -S -o soundex.s I then compiled both on the failing platform: gcc -g soundex.s -o soundex If I

[Bug c/39166] strlen() crashes with sigsegv on ubuntu 8.10

2009-02-12 Thread ajrobb at bigfoot dot com
--- Comment #1 from ajrobb at bigfoot dot com 2009-02-12 10:58 --- Created an attachment (id=17285) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17285&action=view) small test file run as: ./soundex burroughs ashcraft brc mcknight mcnaught mcknawt The optimised code p

[Bug c/39166] New: strlen() crashes with sigsegv on ubuntu 8.10

2009-02-12 Thread ajrobb at bigfoot dot com
Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ajrobb at bigfoot dot com GCC build triplet: i486-linux-gnu GCC host triplet: i486-linux-gnu GCC target triplet: i486-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39166

[Bug c++/37949] New: static initialisation through pointer deferred until run time

2008-10-29 Thread ajrobb at bigfoot dot com
Product: gcc Version: 4.2.4 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ajrobb at bigfoot dot com GCC build triplet: i486-linux-gnu

[Bug middle-end/37443] fast 64-bit divide by constant on 32-bit platform

2008-09-20 Thread ajrobb at bigfoot dot com
--- Comment #4 from ajrobb at bigfoot dot com 2008-09-21 02:39 --- Created an attachment (id=16370) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16370&action=view) proposed 32-bit API calls for 64-bit constant divison The original attachment did not handle shift greater

[Bug middle-end/37443] fast 64-bit divide by constant on 32-bit platform

2008-09-20 Thread ajrobb at bigfoot dot com
--- Comment #3 from ajrobb at bigfoot dot com 2008-09-20 17:32 --- Created an attachment (id=16369) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16369&action=view) proposed 32-bit API calls for 64-bit constant divison I have attached a sample assembler code for a API ca

[Bug c/37443] New: fast 64-bit divide by constant 32-bit

2008-09-09 Thread ajrobb at bigfoot dot com
CONFIRMED Severity: enhancement Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ajrobb at bigfoot dot com GCC build triplet: i686-pc-cygwin GCC host triplet: i686-pc-cygwin GCC target triplet: i686-pc-cygwin http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37443

[Bug middle-end/20283] optimising muldiv() type operations

2008-08-31 Thread ajrobb at bigfoot dot com
--- Comment #6 from ajrobb at bigfoot dot com 2008-09-01 05:50 --- OK - it's me again. I have formulated a general case optimization - I should keep quiet now ;-) : /* Demonstrate a general fast multiply and divide by rational number. * Both methods agree over the entire doma

[Bug middle-end/20283] optimising muldiv() type operations

2008-08-31 Thread ajrobb at bigfoot dot com
--- Comment #5 from ajrobb at bigfoot dot com 2008-08-31 13:40 --- For the case where the overall scale is between 1 and 2 (exclusive), it is straightforward to implement a solution with a single multiply and no shifts: /* Demostrate fast multiply and divide by rational number, r

[Bug middle-end/20283] optimising muldiv() type operations

2008-08-31 Thread ajrobb at bigfoot dot com
--- Comment #4 from ajrobb at bigfoot dot com 2008-08-31 07:48 --- I should point out that for operations (x * y / z) where y > z, there is nothing to be gained on an Intel Core 2 duo (as extra adds and a shrd are required for the scaling to work over the whole domain: 0..(1<

[Bug middle-end/37233] 64-bit product of 32-bit value loses optimisation when inlined

2008-08-30 Thread ajrobb at bigfoot dot com
--- Comment #2 from ajrobb at bigfoot dot com 2008-08-30 07:21 --- Thanks for that. I notice that the 64-bit value is now being accumulated in memory rather than in registers. To be fair, a full 64-bit accumulator need not be maintained - only the high 32 bits. Could you compile the

[Bug c/37233] New: 64-bit product of 32-bit value loses optimisation when inlined

2008-08-25 Thread ajrobb at bigfoot dot com
AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ajrobb at bigfoot dot com GCC build triplet: i586-suse-linux GCC host triplet: i586-suse-linux GCC target triplet: i586-suse-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37233

[Bug c++/36549] offsetof defined as function in contravention of ISO/IEC 14882:1998 17.4.1.2 para 5

2008-06-17 Thread ajrobb at bigfoot dot com
--- Comment #2 from ajrobb at bigfoot dot com 2008-06-17 08:15 --- While I am not convinced that offsetof isn't effectively being implemented as a function (OK it is defined as a function call and not a function reference), I accept that we cannot use variable array indexin

[Bug c++/36549] New: offsetof defined as function in contravention of ISO/IEC 14882:1998 17.4.1.2 para 5

2008-06-16 Thread ajrobb at bigfoot dot com
ion in contravention of ISO/IEC 14882:1998 17.4.1.2 para 5 Product: gcc Version: 4.2.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org Rep

[Bug c/31734] optimizer looses ops for with aliasing

2007-04-29 Thread ajrobb at bigfoot dot com
--- Comment #2 from ajrobb at bigfoot dot com 2007-04-29 19:51 --- Thanks, I'd forgotten that you can only alias through char* (or types related to the operand). Given that "A character type may alias any other type.", I suppose I should be able to use (it works

[Bug c/31734] New: optimizer looses ops for with aliasing

2007-04-28 Thread ajrobb at bigfoot dot com
2, using dmd 0.125) gcc version 3.3.3 (SuSE Linux) -- Summary: optimizer looses ops for with aliasing Product: gcc Version: 4.1.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassi

[Bug target/27125] optimize array bit shift

2006-05-10 Thread ajrobb at bigfoot dot com
--- Comment #2 from ajrobb at bigfoot dot com 2006-05-10 09:45 --- Created an attachment (id=11428) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11428&action=view) multi-word bit shift This is my loop - using a single index that decrements to zero I have seen simple

[Bug c/27125] New: optimize array bit shift

2006-04-11 Thread ajrobb at bigfoot dot com
shift Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ajrobb at bigfoot dot com GCC build triplet: i686-pc-linu

[Bug middle-end/20283] optimising muldiv() type operations

2005-03-02 Thread ajrobb at bigfoot dot com
--- Additional Comments From ajrobb at bigfoot dot com 2005-03-02 16:53 --- Subject: Re: optimising muldiv() type operations Hi, Thanks for getting back. Your code below still performs a separate multiply by 47 before 'dividing' by 40. My enhancement request is to combine

[Bug c/20283] New: optimising muldiv() type operations

2005-03-02 Thread ajrobb at bigfoot dot com
cc Version: 3.3.4 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ajrobb at bigfoot dot com CC: gcc-bugs at gcc dot gnu dot org GCC host tr