From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5911 invoked by alias); 30 Jan 2015 20:00:18 -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 5669 invoked by uid 48); 30 Jan 2015 20:00:11 -0000 From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/61599] [x86_64] With -mcmodel=medium, extern global arrays without size are not treated conservatively. Date: Fri, 30 Jan 2015 20:00: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: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ubizjak at gmail dot com X-Bugzilla-Status: REOPENED 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 resolution 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-01/txt/msg03564.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D61599 Uro=C5=A1 Bizjak changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Last reconfirmed| |2015-01-30 CC| |hjl.tools at gmail dot com Resolution|FIXED |--- Ever confirmed|0 |1 --- Comment #3 from Uro=C5=A1 Bizjak --- Adding -fpic, I got: /ssd/uros/gcc-build/gcc/xgcc -B/ssd/uros/gcc-build/gcc/ /home/uros/gcc-svn/trunk/gcc/testsuite/gcc.target/i386/pr61599-1.c -fno-diagnostics-show-caret -fdiagnostics-color=3Dnever -mcmodel=3Dmedium -fdata-sections /home/uros/gcc-svn/trunk/gcc/testsuite/gcc.target/i386/pr61599-2.c -lm -fpi= c -o ./pr61599-1.exe /tmp/ccfpoxHY.o: In function `bar': pr61599-2.c:(.text+0xe): relocation truncated to fit: R_X86_64_PC32 against symbol `a' defined in LARGE_COMMON section in /tmp/ccKTKST2.o collect2: error: ld returned 1 exit status compiler exited with status 1 Reopened, it looks that some sections are not handled correctly. >>From gcc-bugs-return-475571-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Jan 30 20:07:05 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 5029 invoked by alias); 30 Jan 2015 20:07:04 -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 4890 invoked by uid 48); 30 Jan 2015 20:06:59 -0000 From: "bjmnbraun at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/63472] transaction_atomic within while loop causes ICE Date: Fri, 30 Jan 2015 20:07: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.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: bjmnbraun at gmail dot com X-Bugzilla-Status: NEW 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: 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-01/txt/msg03565.txt.bz2 Content-length: 533 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63472 --- Comment #7 from Benjamin Braun --- A workaround for the code at the top of this thread is to wrap the transaction in the loop with a function and instead call that function from the loop. This workaround also works for the case given in duplicate filing https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64879, however the wrapper function has to be marked __attribute__((noinline)) otherwise the function gets inlined and then the workaround fails.