Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Jun 2017 22:37:53 +0200
From:      Eduardo Morras <emorrasg@yahoo.es>
To:        freebsd-questions@freebsd.org
Subject:   Re: -O2 flag
Message-ID:  <20170610223753.4e37600d2c32d0b689144e00@yahoo.es>
In-Reply-To: <593C4679.5010104@gmail.com>
References:  <593C4679.5010104@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 10 Jun 2017 16:20:25 -0300
Friedrich Locke <friedrich.locke@gmail.com> wrote:

> Hi folks,
> 
> i am trying compile a program with cc on freebsd 11.
> When i use -O2 compilation flag, the compiled code is giving error on 
> execution, but with i omit -O2 everything works ok.
> 
> Have anybody already faced such problem ?

No, which compiler are you using? Which version? Are you using the last
version? It looks like a bug in the compiler, perhaps modifying your
code you can bypass it.

In FreeBSD 11, the default cc is clang38, try with clang40. To install
it, use port llvm40, it includes clang40 now:

#pkg install llvm40

and use clang40 instead cc.

> Thanks in advance.

 HTH

---   ---
Eduardo Morras <emorrasg@yahoo.es>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170610223753.4e37600d2c32d0b689144e00>