From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 106586 invoked by alias); 19 Aug 2015 19:55:25 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 106555 invoked by uid 48); 19 Aug 2015 19:55:21 -0000 From: "manu at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/67279] -fsanitize=undefined spurious error: initializer element is not constant Date: Wed, 19 Aug 2015 19:55:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 5.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: manu at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on cc everconfirmed Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-08/txt/msg01371.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D67279 Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2015-08-19 CC| |manu at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #4 from Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez --- The reason for the error is that -fsanitize=3Dundefined replaces 1<<31 with= a call to a sanitizer function __ubsan_handle_shift_out_of_bounds(), however, this function call is not constant and it cannot be the initializer of a st= atic variable. A possible solution could be to give a warning enabled by default (about 1 = << 31 being undefined) and to NOT sanitize expressions that are required to be constants (since anyway the compiler will not accept them). In any case, it makes sense that -fsanitize=3Dundefined does not affect whe= ther the code is compiled or not. >>From gcc-bugs-return-495230-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Aug 19 20:26:00 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 60079 invoked by alias); 19 Aug 2015 20:26:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 60011 invoked by uid 48); 19 Aug 2015 20:25:56 -0000 From: "bergner at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/67281] HTM builtins aren't treated as compiler barriers on powerpc Date: Wed, 19 Aug 2015 20:26:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: bergner at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-08/txt/msg01372.txt.bz2 Content-length: 1068 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D67281 Peter Bergner changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bergner at gcc dot gnu.org --- Comment #5 from Peter Bergner --- (In reply to Tulio Magno Quites Machado Filho from comment #4) > I disagree with you. I agree with Tulio. > Here's an example: >=20 > long > foo (long dest, long *src0, long src1, long tries) > { > long i; > for (i =3D 0; i < tries; i++) > { > __builtin_tbegin (0); > dest =3D *src0 + src1; > if (dest =3D=3D 13) > __builtin_tabort(0); > __builtin_tend (0); > } > return dest; > } Even better is to change src1 to a pointer too and dereference that within = the transaction. If *src0 and *src1 are two memory locations that should be updated together and atomically, then allowing them to move past the tbegin. could break that requirement. >>From gcc-bugs-return-495231-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Aug 19 20:38:54 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 84661 invoked by alias); 19 Aug 2015 20:38:54 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 84370 invoked by uid 48); 19 Aug 2015 20:38:50 -0000 From: "ville.voutilainen at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/66606] missing diagnostic on using function main Date: Wed, 19 Aug 2015 20:38:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 5.1.0 X-Bugzilla-Keywords: accepts-invalid, diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: ville.voutilainen at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on cc everconfirmed Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-08/txt/msg01373.txt.bz2 Content-length: 498 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66606 Ville Voutilainen changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2015-08-19 CC| |ville.voutilainen at gmail dot com Ever confirmed|0 |1