From owner-freebsd-questions@freebsd.org Sun Jun 11 00:05:07 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D54DBF9014 for ; Sun, 11 Jun 2017 00:05:07 +0000 (UTC) (envelope-from friedrich.locke@gmail.com) Received: from mail-qt0-x242.google.com (mail-qt0-x242.google.com [IPv6:2607:f8b0:400d:c0d::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BF57367762 for ; Sun, 11 Jun 2017 00:05:06 +0000 (UTC) (envelope-from friedrich.locke@gmail.com) Received: by mail-qt0-x242.google.com with SMTP id s33so20647351qtg.3 for ; Sat, 10 Jun 2017 17:05:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-transfer-encoding; bh=7ZGcNKB7dLsuUDtgdagrl863egSEVno00IdLAp1iP04=; b=c2bRcL1of64PkYKPRH7rJy7LA4kchZts2u2EFLCpzBJGqj8h0ljP6fdXdvMSQOmYJs BZqtEI56bqqdns+pZSvmAsWvjT0JK9qpxiOnCtXc6ryaAQCih24S/MK9bKO4Y918ypdD gd0W0JAqXGMEJFPwXvUYZTA/w5YD89Qsk1V+nGmOgGeDgX1dOQetIWyDpmWFZSrsigDM 0j+/JhEMq3G+TBsSHVBiP1wxdk44UeBCuFAnpnqU5BBNSIoL/FlAEGdtlF3mU1O64NwW u9sJ7lqJMVnuoYUfaq9Xa8nFH5yUlXYk/dMzvVDClwKp66Qq40w8WPykFRWG3mLRustr tlPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-transfer-encoding; bh=7ZGcNKB7dLsuUDtgdagrl863egSEVno00IdLAp1iP04=; b=UY4wFLJD/g1DkIEXju9UbLA/HrEjW4JnHHLdFnPkHNNpaEtNsZzOwzB96gLCWVib0p CN/Ww13u2NdzUnNwdF5rcwhw/23YlIXitNLuzuYUGUoTs7QLBFRMz4TyPvFYbh03nVCt KWxsjl4ok6CznTK7ly8nUfXPLWk6cPu/BYLseF5RlLFaKrOG+/QoZIv9qHvBaJT0kjVj 7Bd6ZnZhxdloofp1vxUKR9QNeenLwbNgJ4rCHPWGiB0W5iJenEvd41SmXPhH6wqP5hSo 2HTGGyC9LegnP6GUYPFPYF7sJeblUL0NdcFunycCQdddONLnfSwefKFwra1nbeqVkVT1 lAZw== X-Gm-Message-State: AODbwcBiGA/1gPnwJA7zazM5bE6ZnwenkVQlMB0wgqfknshk0z/yPbPD LJByCTp0ddR7jg== X-Received: by 10.200.46.167 with SMTP id h36mr11000698qta.96.1497139505987; Sat, 10 Jun 2017 17:05:05 -0700 (PDT) Received: from [192.168.0.103] (186-247-54-119.user.veloxzone.com.br. [186.247.54.119]) by smtp.gmail.com with ESMTPSA id m3sm3569604qkd.58.2017.06.10.17.05.04 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 10 Jun 2017 17:05:05 -0700 (PDT) Message-ID: <593C892D.4070200@gmail.com> Date: Sat, 10 Jun 2017 21:05:01 -0300 From: Friedrich Locke User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Serpent7776 , freebsd-questions@freebsd.org Subject: Re: -O2 flag References: <593C4679.5010104@gmail.com> <20170610230928.581e3cf9@DaemONX> In-Reply-To: <20170610230928.581e3cf9@DaemONX> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jun 2017 00:05:07 -0000 Here you have it: gustav# cc --version FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0) Target: x86_64-unknown-freebsd11.0 Thread model: posix InstalledDir: /usr/bin gustav# Em 10/06/2017 18:09, Serpent7776 escreveu: > On Sat, 10 Jun 2017 16:20:25 -0300 > Friedrich Locke 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 ? > Yes, a few times in the past. Your code may have hidden bug which is triggered > only with optimizations enabled. It might be relying on some kind of undefined > behaviour. > Unfortunately, I don't have any helpful advices on how to find this error - > try enabling all compiler warnings flags. > I'd suspect a bug in your code rather than a bug in compiler, but the latter is > not impossible. > >> Thanks in advance. >> _______________________________________________ >> freebsd-questions@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-questions >> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > > >