Is this a programming error, or a compiler error..

2019-03-13 Thread Willem Jan Withagen
Hi, I'm getting a crash in a Ceph test program in the following pice of code: struct entity_addrvec_t {   vector v; .   entity_addr_t legacy_addr() const {     for (auto& a : v) {   if (a.type == entity_addr_t::TYPE_LEGACY) {     return a;   }     }     return entity_addr_t();  

Re: Is this a programming error, or a compiler error..

2019-03-13 Thread Dimitry Andric
On 13 Mar 2019, at 12:57, Willem Jan Withagen wrote: > > I'm getting a crash in a Ceph test program in the following pice of code: > > struct entity_addrvec_t { > vector v; > . > entity_addr_t legacy_addr() const { > for (auto& a : v) { > if (a.type == entity_addr_t::TYPE_LEGAC

Re: Is this a programming error, or a compiler error..

2019-03-13 Thread Willem Jan Withagen
On 13-3-2019 13:17, Dimitry Andric wrote: On 13 Mar 2019, at 12:57, Willem Jan Withagen wrote: I'm getting a crash in a Ceph test program in the following pice of code: struct entity_addrvec_t { vector v; . entity_addr_t legacy_addr() const { for (auto& a : v) { if (a.typ

Re: Optimization bug with floating-point?

2019-03-13 Thread Steve Kargl
On Tue, Mar 12, 2019 at 07:45:41PM -0700, Steve Kargl wrote: > All, > > There seems to an optimization bug with clang on > > % uname -a > FreeBSD mobile 13.0-CURRENT FreeBSD 13.0-CURRENT r344653 MOBILE i386 > > IOW, if you do numerica work on i386, you may want to check your > results. > > The

Re: Optimization bug with floating-point?

2019-03-13 Thread Steve Kargl
On Tue, Mar 12, 2019 at 07:45:41PM -0700, Steve Kargl wrote: > > cc -O -fno-builtin -o z a.c -lm && ./z > cc -O2 -fno-builtin -o z a.c -lm && ./z > cc -O3 -fno-builtin -o z a.c -lm && ./z > > > Max ULP: 23.061242 > Count: 39 (# of ULP that exceeds 21) > These results do not change if

Re: Optimization bug with floating-point?

2019-03-13 Thread Steve Kargl
On Tue, Mar 12, 2019 at 07:45:41PM -0700, Steve Kargl wrote: > > gcc8 --version > gcc8 (FreeBSD Ports Collection) 8.3.0 > > gcc8 -fno-builtin -o z a.c -lm && ./z > gcc8 -O -fno-builtin -o z a.c -lm && ./z > gcc8 -O2 -fno-builtin -o z a.c -lm && ./z > gcc8 -O3 -fno-builtin -o z a.c -lm && ./z > >

Re: Optimization bug with floating-point?

2019-03-13 Thread Hans Petter Selasky
On 3/13/19 4:16 PM, Steve Kargl wrote: On Tue, Mar 12, 2019 at 07:45:41PM -0700, Steve Kargl wrote: gcc8 --version gcc8 (FreeBSD Ports Collection) 8.3.0 gcc8 -fno-builtin -o z a.c -lm && ./z gcc8 -O -fno-builtin -o z a.c -lm && ./z gcc8 -O2 -fno-builtin -o z a.c -lm && ./z gcc8 -O3 -fno-builti

Re: Optimization bug with floating-point?

2019-03-13 Thread Steve Kargl
On Wed, Mar 13, 2019 at 04:41:51PM +0100, Hans Petter Selasky wrote: > On 3/13/19 4:16 PM, Steve Kargl wrote: > > On Tue, Mar 12, 2019 at 07:45:41PM -0700, Steve Kargl wrote: > >> > >> gcc8 --version > >> gcc8 (FreeBSD Ports Collection) 8.3.0 > >> > >> gcc8 -fno-builtin -o z a.c -lm && ./z > >> gcc

[Bug 236313] graphics/opencollada: excessive build time with clang 8 on i386

2019-03-13 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236313 --- Comment #5 from commit-h...@freebsd.org --- A commit references this bug: Author: jbeich Date: Wed Mar 13 15:54:15 UTC 2019 New revision: 495589 URL: https://svnweb.freebsd.org/changeset/ports/495589 Log: graphics/opencollada: back o

Re: Optimization bug with floating-point?

2019-03-13 Thread Hans Petter Selasky
On 3/13/19 4:50 PM, Steve Kargl wrote: Using sin() and cos() directly as in /* Double precision csinh() without using C's double complex.s */ void dp_csinh(double x, double y, double *re, double *im) { double c, s; *re = sinh(x) * cos(y); *im = cosh(x) * sin(y); } does not change th

Re: Optimization bug with floating-point?

2019-03-13 Thread Steve Kargl
On Wed, Mar 13, 2019 at 04:56:26PM +0100, Hans Petter Selasky wrote: > On 3/13/19 4:50 PM, Steve Kargl wrote: > > Using sin() and cos() directly as in > > > > /* Double precision csinh() without using C's double complex.s */ > > void > > dp_csinh(double x, double y, double *re, double *im) > > { >

Re: Optimization bug with floating-point?

2019-03-13 Thread John Baldwin
On 3/13/19 8:16 AM, Steve Kargl wrote: > On Tue, Mar 12, 2019 at 07:45:41PM -0700, Steve Kargl wrote: >> >> gcc8 --version >> gcc8 (FreeBSD Ports Collection) 8.3.0 >> >> gcc8 -fno-builtin -o z a.c -lm && ./z >> gcc8 -O -fno-builtin -o z a.c -lm && ./z >> gcc8 -O2 -fno-builtin -o z a.c -lm && ./z >>

Re: Optimization bug with floating-point?

2019-03-13 Thread Steve Kargl
On Wed, Mar 13, 2019 at 09:32:57AM -0700, John Baldwin wrote: > On 3/13/19 8:16 AM, Steve Kargl wrote: > > On Tue, Mar 12, 2019 at 07:45:41PM -0700, Steve Kargl wrote: > >> > >> gcc8 --version > >> gcc8 (FreeBSD Ports Collection) 8.3.0 > >> > >> gcc8 -fno-builtin -o z a.c -lm && ./z > >> gcc8 -O -f

Re: Optimization bug with floating-point?

2019-03-13 Thread John Baldwin
On 3/13/19 9:40 AM, Steve Kargl wrote: > On Wed, Mar 13, 2019 at 09:32:57AM -0700, John Baldwin wrote: >> On 3/13/19 8:16 AM, Steve Kargl wrote: >>> On Tue, Mar 12, 2019 at 07:45:41PM -0700, Steve Kargl wrote: gcc8 --version gcc8 (FreeBSD Ports Collection) 8.3.0 gcc8 -fno-b

Re: Optimization bug with floating-point?

2019-03-13 Thread Conrad Meyer
Hi John, On Wed, Mar 13, 2019 at 10:17 AM John Baldwin wrote: > One issue I'm aware of is that clang does not have any support for the > special arrangement FreeBSD/i386 uses where it uses different precision > for registers vs in-memory for some of the floating point types (GCC has > a special h

Re: Optimization bug with floating-point?

2019-03-13 Thread Steve Kargl
On Wed, Mar 13, 2019 at 10:16:12AM -0700, John Baldwin wrote: > On 3/13/19 9:40 AM, Steve Kargl wrote: > > On Wed, Mar 13, 2019 at 09:32:57AM -0700, John Baldwin wrote: > >> On 3/13/19 8:16 AM, Steve Kargl wrote: > >>> On Tue, Mar 12, 2019 at 07:45:41PM -0700, Steve Kargl wrote: > > gcc8

Re: Optimization bug with floating-point?

2019-03-13 Thread Steve Kargl
On Wed, Mar 13, 2019 at 10:40:28AM -0700, Conrad Meyer wrote: > Hi John, > > On Wed, Mar 13, 2019 at 10:17 AM John Baldwin wrote: > > One issue I'm aware of is that clang does not have any support for the > > special arrangement FreeBSD/i386 uses where it uses different precision > > for register

Re: Optimization bug with floating-point?

2019-03-13 Thread Steve Kargl
On Wed, Mar 13, 2019 at 10:16:12AM -0700, John Baldwin wrote: > On 3/13/19 9:40 AM, Steve Kargl wrote: > > On Wed, Mar 13, 2019 at 09:32:57AM -0700, John Baldwin wrote: > >> On 3/13/19 8:16 AM, Steve Kargl wrote: > >>> On Tue, Mar 12, 2019 at 07:45:41PM -0700, Steve Kargl wrote: > > gcc8

Re: llvm submittal 41050 created for powerpc64 C++ exception code generation: ld r2,40(r1) missing or skipped before bl __cxa_begin_catch code

2019-03-13 Thread Mark Millard via freebsd-toolchain
On 2019-Mar-12, at 22:08, Mark Millard wrote: > I have submitted: > > https://bugs.llvm.org//show_bug.cgi?id=41050 > > for the clang 8 code generation problem of > no code for setting r2 appropriately before > the: > > bl . . . <0018.plt_call.__cxa_begin_catch@@CXXABI_1.3> > > in unopt

Re: Optimization bug with floating-point?

2019-03-13 Thread Steve Kargl
On Wed, Mar 13, 2019 at 02:24:55PM -0700, Steve Kargl wrote: > On Wed, Mar 13, 2019 at 10:16:12AM -0700, John Baldwin wrote: > > On 3/13/19 9:40 AM, Steve Kargl wrote: > > > On Wed, Mar 13, 2019 at 09:32:57AM -0700, John Baldwin wrote: > > >> On 3/13/19 8:16 AM, Steve Kargl wrote: > > >>> On Tue, M