public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/61967] New: regression: cannot link with -flto
@ 2014-07-30 18:50 dilyan.palauzov at aegee dot org
  2014-07-30 19:04 ` [Bug lto/61967] " trippels at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: dilyan.palauzov at aegee dot org @ 2014-07-30 18:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61967

            Bug ID: 61967
           Summary: regression: cannot link with -flto
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dilyan.palauzov at aegee dot org

I download tar-1.28 from ftp.gnu.org , and ./configure with
CFLAGS='-pipe -O3 -flto -Wl,-S -Wl,--hash-style=gnu -Wl,-O1 -Wl,-z,relro'

If I compile and link with gcc483, everything is fine, but with gcc491 I get:

Making all in rmt
make[2]: Entering directory '/mnt/new/src/tar-1.28/rmt'
gcc -std=gnu99  -pipe -O3 -flto -Wl,-S -Wl,--hash-style=gnu -Wl,-O1
-Wl,-z,relro  -L/usr/lib64 -L/lib64 -o rmt rmt.o ../gnu/libgnu.a
/tmp/ccOs1raW.ltrans0.ltrans.o: In function `close_device':
ccOs1raW.ltrans0.o:(.text+0x3b4): undefined reference to `umaxtostr'
/tmp/ccOs1raW.ltrans0.ltrans.o: In function `main':
ccOs1raW.ltrans0.o:(.text.startup+0x1a): undefined reference to
`set_program_name'
ccOs1raW.ltrans0.o:(.text.startup+0x29): undefined reference to
`argp_version_setup'
ccOs1raW.ltrans0.o:(.text.startup+0x1c4): undefined reference to `umaxtostr'
ccOs1raW.ltrans0.o:(.text.startup+0x1e7): undefined reference to `full_write'
ccOs1raW.ltrans0.o:(.text.startup+0x245): undefined reference to `safe_read'
ccOs1raW.ltrans0.o:(.text.startup+0x25f): undefined reference to `umaxtostr'
ccOs1raW.ltrans0.o:(.text.startup+0x282): undefined reference to `full_write'
ccOs1raW.ltrans0.o:(.text.startup+0x295): undefined reference to `xstrdup'
ccOs1raW.ltrans0.o:(.text.startup+0x3f8): undefined reference to `umaxtostr'
ccOs1raW.ltrans0.o:(.text.startup+0x7cc): undefined reference to `umaxtostr'
ccOs1raW.ltrans0.o:(.text.startup+0x860): undefined reference to `full_write'
ccOs1raW.ltrans0.o:(.text.startup+0x89a): undefined reference to `xrealloc'
ccOs1raW.ltrans0.o:(.text.startup+0x8c6): undefined reference to `xrealloc'
collect2: error: ld returned 1 exit status
Makefile:1266: recipe for target 'rmt' failed
make[2]: *** [rmt] Error 1
make[2]: Leaving directory '/mnt/new/src/tar-1.28/rmt'
Makefile:1348: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/mnt/new/src/tar-1.28'
Makefile:1287: recipe for target 'all' failed
make: *** [all] Error 2

Removing -flto leads to successful compilation.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug lto/61967] regression: cannot link with -flto
  2014-07-30 18:50 [Bug lto/61967] New: regression: cannot link with -flto dilyan.palauzov at aegee dot org
@ 2014-07-30 19:04 ` trippels at gcc dot gnu.org
  2014-07-30 19:05 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-07-30 19:04 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61967

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |trippels at gcc dot gnu.org
         Resolution|---                         |INVALID

--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
https://gcc.gnu.org/wiki/LinkTimeOptimizationFAQ#ar.2C_nm_and_ranlib


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug lto/61967] regression: cannot link with -flto
  2014-07-30 18:50 [Bug lto/61967] New: regression: cannot link with -flto dilyan.palauzov at aegee dot org
  2014-07-30 19:04 ` [Bug lto/61967] " trippels at gcc dot gnu.org
@ 2014-07-30 19:05 ` pinskia at gcc dot gnu.org
  2014-07-30 22:50 ` dilyan.palauzov at aegee dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2014-07-30 19:05 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61967

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>../gnu/libgnu.a

I bet it is due to how ../gnu/libgnu.a is generated.  Does it use gcc-ar or
just ar?  For 4.9 and above, we use slim lto object files so it does not
produce a symbol table that ar does not understand without a plugin and gcc-ar
forces the plugin to be loaded.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug lto/61967] regression: cannot link with -flto
  2014-07-30 18:50 [Bug lto/61967] New: regression: cannot link with -flto dilyan.palauzov at aegee dot org
  2014-07-30 19:04 ` [Bug lto/61967] " trippels at gcc dot gnu.org
  2014-07-30 19:05 ` pinskia at gcc dot gnu.org
@ 2014-07-30 22:50 ` dilyan.palauzov at aegee dot org
  2014-07-30 23:48 ` dilyan.palauzov at aegee dot org
  2014-07-31  7:28 ` dilyan.palauzov at aegee dot org
  4 siblings, 0 replies; 6+ messages in thread
From: dilyan.palauzov at aegee dot org @ 2014-07-30 22:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61967

--- Comment #3 from Дилян Палаузов <dilyan.palauzov at aegee dot org> ---
Please include a link from https://gcc.gnu.org/wiki/LinkTimeOptimization to
https://gcc.gnu.org/wiki/LinkTimeOptimizationFAQ and update the latter to state

(The next version of binutils [as of 2014-05-04] will support automatic loading
of the liblto_plugin.)

I ask you for the first change, as searching for "gcc link time optimizations"
in a search engine I find only the first link and cannot come to the idea that
a FAQ exists.

The second change indicates how outdated the message is, and makes clear in
"the next version" is in the meantime released without updating the Wiki.
>From gcc-bugs-return-457422-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jul 30 23:06:36 2014
Return-Path: <gcc-bugs-return-457422-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 29805 invoked by alias); 30 Jul 2014 23:06:35 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 29774 invoked by uid 48); 30 Jul 2014 23:06:32 -0000
From: "aggrostyle at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/61407] Build errors on latest OS X 10.10 Yosemite with Xcode 6 on GCC 4.8.3
Date: Wed, 30 Jul 2014 23:06: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: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: aggrostyle 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: cc
Message-ID: <bug-61407-4-mHHD8QLheI@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61407-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61407-4@http.gcc.gnu.org/bugzilla/>
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: 2014-07/txt/msg02013.txt.bz2
Content-length: 660

https://gcc.gnu.org/bugzilla/show_bug.cgi?ida407

aggrostyle at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aggrostyle at gmail dot com

--- Comment #18 from aggrostyle at gmail dot com ---
Guys, a question... how can i apply the patch? I've read that i have to add:

patch do
    url "https://gcc.gnu.org/bugzilla/attachment.cgi?id3180"
    sha1 "def0cb036a255175db86f106e2bb9dd66d19b702"
  end

But i don't know WHERE to add that in the formula when i use brew edit gcc...

Any help? Thanks!


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug lto/61967] regression: cannot link with -flto
  2014-07-30 18:50 [Bug lto/61967] New: regression: cannot link with -flto dilyan.palauzov at aegee dot org
                   ` (2 preceding siblings ...)
  2014-07-30 22:50 ` dilyan.palauzov at aegee dot org
@ 2014-07-30 23:48 ` dilyan.palauzov at aegee dot org
  2014-07-31  7:28 ` dilyan.palauzov at aegee dot org
  4 siblings, 0 replies; 6+ messages in thread
From: dilyan.palauzov at aegee dot org @ 2014-07-30 23:48 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61967

--- Comment #4 from Дилян Палаузов <dilyan.palauzov at aegee dot org> ---
(In reply to Andrew Pinski from comment #2)
> >../gnu/libgnu.a
> 
> I bet it is due to how ../gnu/libgnu.a is generated.  Does it use gcc-ar or
> just ar?  For 4.9 and above, we use slim lto object files so it does not
> produce a symbol table that ar does not understand without a plugin and
> gcc-ar forces the plugin to be loaded.

gnulib is proceeded with ar, as you can see below. The fix from
https://sourceware.org/bugzilla/show_bug.cgi?id=14698 foreseen for the next
release of binutils has not helped me.

$ rm gnu/libgnu.a
$ make V=1

make[4]: Entering directory '/mnt/new/src/tar-1.28/gnu'
rm -f libgnu.a
ar cru libgnu.a copy-acl.o set-acl.o allocator.o areadlink.o areadlinkat.o
argmatch.o argp-ba.o argp-eexst.o argp-fmtstream.o argp-fs-xinl.o argp-help.o
argp-parse.o argp-pin.o argp-pv.o argp-pvh.o argp-xinl.o argp-version-etc.o
backupfile.o bitrotate.o c-ctype.o c-strcasecmp.o c-strncasecmp.o
careadlinkat.o cloexec.o close-stream.o closeout.o opendir-safer.o dirname.o
basename.o dirname-lgpl.o basename-lgpl.o stripslash.o exclude.o exitfail.o
chmodat.o chownat.o fd-hook.o fdutimensat.o filenamecat-lgpl.o fprintftime.o
full-write.o gettime.o hash.o human.o imaxtostr.o inttostr.o offtostr.o
uinttostr.o umaxtostr.o localcharset.o malloca.o mbchar.o mbscasecmp.o
mbuiter.o modechange.o openat-die.o parse-datetime.o priv-set.o progname.o
acl-errno-valid.o file-has-acl.o qcopy-acl.o qset-acl.o quotearg.o safe-read.o
safe-write.o save-cwd.o savedir.o se-context.o se-selinux.o stat-time.o
statat.o strftime.o strnlen1.o tempname.o timespec.o unistd.o dup-safer.o
fd-safer.o pipe-safer.o uniwidth/width.o unlinkdir.o utimens.o version-etc.o
version-etc-fsf.o wctype-h.o xmalloc.o xalloc-die.o xgetcwd.o xsize.o
xstrndup.o xstrtol.o xstrtoul.o xstrtol-error.o xstrtoumax.o xvasprintf.o
xasprintf.o asnprintf.o chdir-long.o fcntl.o futimens.o getopt.o getopt1.o
linkat.o openat-proc.o printf-args.o printf-parse.o regex.o selinux-at.o
utimensat.o vasnprintf.o
ranlib libgnu.a
make[4]: Leaving directory '/mnt/new/src/tar-1.28/gnu'
>From gcc-bugs-return-457425-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Jul 31 00:01:36 2014
Return-Path: <gcc-bugs-return-457425-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 8031 invoked by alias); 31 Jul 2014 00:01:36 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 7767 invoked by uid 48); 31 Jul 2014 00:01:32 -0000
From: "dilyan.palauzov at aegee dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/61967] regression: cannot link with -flto
Date: Thu, 31 Jul 2014 00:01:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: lto
X-Bugzilla-Version: 4.9.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: dilyan.palauzov at aegee dot org
X-Bugzilla-Status: RESOLVED
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: <bug-61967-4-dInqKX2LXp@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61967-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61967-4@http.gcc.gnu.org/bugzilla/>
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: 2014-07/txt/msg02016.txt.bz2
Content-length: 3608

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61967

--- Comment #5 from Дилян Палаузов <dilyan.palauzov at aegee dot org> ---
Using gcc-ar instead of ar does not help:

$grep AR\ = Makefile
AR = gcc-ar
...
$rm gnu/libgnu.a

$make V=1

make[4]: Entering directory '/mnt/new/src/tar-1.28/gnu'
rm -f libgnu.a
gcc-ar cru libgnu.a copy-acl.o set-acl.o allocator.o areadlink.o areadlinkat.o
argmatch.o argp-ba.o argp-eexst.o argp-fmtstream.o argp-fs-xinl.o argp-help.o
argp-parse.o argp-pin.o argp-pv.o argp-pvh.o argp-xinl.o argp-version-etc.o
backupfile.o bitrotate.o c-ctype.o c-strcasecmp.o c-strncasecmp.o
careadlinkat.o cloexec.o close-stream.o closeout.o opendir-safer.o dirname.o
basename.o dirname-lgpl.o basename-lgpl.o stripslash.o exclude.o exitfail.o
chmodat.o chownat.o fd-hook.o fdutimensat.o filenamecat-lgpl.o fprintftime.o
full-write.o gettime.o hash.o human.o imaxtostr.o inttostr.o offtostr.o
uinttostr.o umaxtostr.o localcharset.o malloca.o mbchar.o mbscasecmp.o
mbuiter.o modechange.o openat-die.o parse-datetime.o priv-set.o progname.o
acl-errno-valid.o file-has-acl.o qcopy-acl.o qset-acl.o quotearg.o safe-read.o
safe-write.o save-cwd.o savedir.o se-context.o se-selinux.o stat-time.o
statat.o strftime.o strnlen1.o tempname.o timespec.o unistd.o dup-safer.o
fd-safer.o pipe-safer.o uniwidth/width.o unlinkdir.o utimens.o version-etc.o
version-etc-fsf.o wctype-h.o xmalloc.o xalloc-die.o xgetcwd.o xsize.o
xstrndup.o xstrtol.o xstrtoul.o xstrtol-error.o xstrtoumax.o xvasprintf.o
xasprintf.o asnprintf.o chdir-long.o fcntl.o futimens.o getopt.o getopt1.o
linkat.o openat-proc.o printf-args.o printf-parse.o regex.o selinux-at.o
utimensat.o vasnprintf.o
ranlib libgnu.a
make[4]: Leaving directory '/mnt/new/src/tar-1.28/gnu'

...
make[2]: Entering directory '/mnt/new/src/tar-1.28/rmt'
gcc -std=gnu99  -pipe -flto -O3 -Wl,-S -Wl,--hash-style=gnu -Wl,-O1
-Wl,-z,relro  -L/usr/lib64 -L/lib64 -o rmt rmt.o ../gnu/libgnu.a
/tmp/ccpoLHOH.ltrans0.ltrans.o: In function `close_device':
ccpoLHOH.ltrans0.o:(.text+0x3b4): undefined reference to `umaxtostr'
/tmp/ccpoLHOH.ltrans0.ltrans.o: In function `main':
ccpoLHOH.ltrans0.o:(.text.startup+0x1a): undefined reference to
`set_program_name'
ccpoLHOH.ltrans0.o:(.text.startup+0x29): undefined reference to
`argp_version_setup'
ccpoLHOH.ltrans0.o:(.text.startup+0x1c4): undefined reference to `umaxtostr'
ccpoLHOH.ltrans0.o:(.text.startup+0x1e7): undefined reference to `full_write'
ccpoLHOH.ltrans0.o:(.text.startup+0x245): undefined reference to `safe_read'
ccpoLHOH.ltrans0.o:(.text.startup+0x25f): undefined reference to `umaxtostr'
ccpoLHOH.ltrans0.o:(.text.startup+0x282): undefined reference to `full_write'
ccpoLHOH.ltrans0.o:(.text.startup+0x295): undefined reference to `xstrdup'
ccpoLHOH.ltrans0.o:(.text.startup+0x3f8): undefined reference to `umaxtostr'
ccpoLHOH.ltrans0.o:(.text.startup+0x7cc): undefined reference to `umaxtostr'
ccpoLHOH.ltrans0.o:(.text.startup+0x860): undefined reference to `full_write'
ccpoLHOH.ltrans0.o:(.text.startup+0x89a): undefined reference to `xrealloc'
ccpoLHOH.ltrans0.o:(.text.startup+0x8c6): undefined reference to `xrealloc'
collect2: error: ld returned 1 exit status
Makefile:1266: recipe for target 'rmt' failed
make[2]: *** [rmt] Error 1
make[2]: Leaving directory '/mnt/new/src/tar-1.28/rmt'
Makefile:1348: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/mnt/new/src/tar-1.28'
Makefile:1287: recipe for target 'all' failed
make: *** [all] Error 2
>From gcc-bugs-return-457426-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Jul 31 00:26:27 2014
Return-Path: <gcc-bugs-return-457426-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 8538 invoked by alias); 31 Jul 2014 00:26:27 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 8495 invoked by uid 48); 31 Jul 2014 00:26:24 -0000
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/61967] regression: cannot link with -flto
Date: Thu, 31 Jul 2014 00:26:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: lto
X-Bugzilla-Version: 4.9.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: pinskia at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
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: <bug-61967-4-tJobh51rmI@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61967-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61967-4@http.gcc.gnu.org/bugzilla/>
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: 2014-07/txt/msg02017.txt.bz2
Content-length: 426

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61967

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Дилян Палаузов from comment #5)
> Using gcc-ar instead of ar does not help:
> 
> $grep AR\ = Makefile
> AR = gcc-ar
> ...

> ranlib libgnu.a

You need to use gcc-ranlib too otherwise the symbol table is also messed up.
>From gcc-bugs-return-457427-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Jul 31 01:06:43 2014
Return-Path: <gcc-bugs-return-457427-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 23713 invoked by alias); 31 Jul 2014 01:06:42 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 23570 invoked by uid 48); 31 Jul 2014 01:06:38 -0000
From: "kaijun at seed dot net.tw" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/61970] New: array subscript is above array bounds [-Werror=array-bounds]
Date: Thu, 31 Jul 2014 01:06:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.8.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: kaijun at seed dot net.tw
X-Bugzilla-Status: UNCONFIRMED
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_id short_desc product version bug_status bug_severity priority component assigned_to reporter
Message-ID: <bug-61970-4@http.gcc.gnu.org/bugzilla/>
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: 2014-07/txt/msg02018.txt.bz2
Content-length: 591

https://gcc.gnu.org/bugzilla/show_bug.cgi?ida970

            Bug ID: 61970
           Summary: array subscript is above array bounds
                    [-Werror=array-bounds]
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kaijun at seed dot net.tw

In Gcc 4.6 before can compiler OK.
but use GCC 4.8.2 (CentOS 7.0)can't comiler.

if comment code //virtual ~PriceLst();
I don't know why and how to fixed it.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug lto/61967] regression: cannot link with -flto
  2014-07-30 18:50 [Bug lto/61967] New: regression: cannot link with -flto dilyan.palauzov at aegee dot org
                   ` (3 preceding siblings ...)
  2014-07-30 23:48 ` dilyan.palauzov at aegee dot org
@ 2014-07-31  7:28 ` dilyan.palauzov at aegee dot org
  4 siblings, 0 replies; 6+ messages in thread
From: dilyan.palauzov at aegee dot org @ 2014-07-31  7:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61967

--- Comment #7 from Дилян Палаузов <dilyan.palauzov at aegee dot org> ---
(In reply to Andrew Pinski from comment #6)
> (In reply to Дилян Палаузов from comment #5)
> > Using gcc-ar instead of ar does not help:
> > 
> > $grep AR\ = Makefile
> > AR = gcc-ar
> > ...
> 
> > ranlib libgnu.a
> 
> You need to use gcc-ranlib too otherwise the symbol table is also messed up.

Okay, using gcc-ranlib did help.
>From gcc-bugs-return-457439-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Jul 31 07:35:59 2014
Return-Path: <gcc-bugs-return-457439-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 16131 invoked by alias); 31 Jul 2014 07:35:59 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 16076 invoked by uid 48); 31 Jul 2014 07:35:54 -0000
From: "nyh at math dot technion.ac.il" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/58408] [C++11] __thread + trivially_constructible -> error
Date: Thu, 31 Jul 2014 07:35: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: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: nyh at math dot technion.ac.il
X-Bugzilla-Status: UNCONFIRMED
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: <bug-58408-4-HF3UKsNRmp@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-58408-4@http.gcc.gnu.org/bugzilla/>
References: <bug-58408-4@http.gcc.gnu.org/bugzilla/>
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: 2014-07/txt/msg02030.txt.bz2
Content-length: 1094

https://gcc.gnu.org/bugzilla/show_bug.cgi?idX408

Nadav Har'El <nyh at math dot technion.ac.il> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nyh at math dot technion.ac.il

--- Comment #2 from Nadav Har'El <nyh at math dot technion.ac.il> ---
I don't think should be considered a bug. "__thread" doesn't get a chance to
run the object's constructor, so the constructor must be constexpr, meaning
that the compiler can figure out, in compile type, the string of bytes needed
to initialize this object, and put it proper section of the executable (the
standard C library then copies this TLS area for each new thread).

So you just need to mark your constructor "constexpr", and your code will work.

It is arguable that the compiler could figure out that your constructor *can
be* constexpr, even if you don't tell it that it is (since when you do tell it
is, it already has the machinary to verify), but I'm not sure why it is worth
the hassle?


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-07-31  7:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-30 18:50 [Bug lto/61967] New: regression: cannot link with -flto dilyan.palauzov at aegee dot org
2014-07-30 19:04 ` [Bug lto/61967] " trippels at gcc dot gnu.org
2014-07-30 19:05 ` pinskia at gcc dot gnu.org
2014-07-30 22:50 ` dilyan.palauzov at aegee dot org
2014-07-30 23:48 ` dilyan.palauzov at aegee dot org
2014-07-31  7:28 ` dilyan.palauzov at aegee dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).