[Bug c++/80351] New: Inconsistent warning for constexpr auto constant when using initializer list (-Wunused-variable)

2017-04-06 Thread arnetheduck at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80351

Bug ID: 80351
   Summary: Inconsistent warning for constexpr auto constant when
using initializer list (-Wunused-variable)
   Product: gcc
   Version: 6.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: arnetheduck at gmail dot com
  Target Milestone: ---

In the following snippet, these similar variables give different warnings, when
compiled with -Wall - I would expect all of them to not give a warning:

#include 

enum class E { A, B };

constexpr E no_warn2[] = { E::A, E::B };

constexpr auto warn = { E::A, E::B };

constexpr auto no_warn = { E::A, E::B };  // No warning second time around

Results in:

:7:16: warning: 'warn' defined but not used [-Wunused-variable]
 constexpr auto warn = { E::A, E::B };
^~~~
Compiler exited with result code 0


See: https://godbolt.org/g/bHGxar

[Bug c++/77563] explicit constructor breaks narrowing conversion overload resolution

2016-09-12 Thread arnetheduck at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77563

--- Comment #1 from Jacek Sieka  ---
gcc 5.3.0 gives a different error - looks odd though, no initializer list in
sight:

/opt/gcc53/bin/g++ -std=gnu++11 explicit.cpp
explicit.cpp: In function ‘int main(int, char**)’:
explicit.cpp:15:7: error: converting to ‘A’ from initializer list would use
explicit constructor ‘A::A(int64_t)’
   f(3l);
   ^
explicit.cpp:11:6: note:   initializing argument 1 of ‘void f(A)’
 void f(A a) { printf("hello\n"); }
  ^
clang++ 3.8 complains about ambiguity:

clang++ -std=gnu++11 explicit.cpp
explicit.cpp:15:5: error: conversion from 'long' to 'A' is ambiguous
  f(3l);
^~
explicit.cpp:5:3: note: candidate constructor
  A(int32_t a) {}
  ^
explicit.cpp:6:3: note: candidate constructor
  A(uint32_t a) {}
  ^
explicit.cpp:11:10: note: passing argument to parameter 'a' here
void f(A a) { printf("hello\n"); }

[Bug c++/77563] New: explicit constructor breaks narrowing conversion overload resolution

2016-09-12 Thread arnetheduck at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77563

Bug ID: 77563
   Summary: explicit constructor breaks narrowing conversion
overload resolution
   Product: gcc
   Version: 6.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: arnetheduck at gmail dot com
  Target Milestone: ---

In the following snippet, an error should be emitted - instead, the compiler
prints a warning and keeps compiling, and simply skips the second call to f (!)
in the resulting executable:

#include 
#include 

struct A {
  A(int32_t a) {}
  A(uint32_t a) {}  // Comment to make it work

  explicit A(int64_t a) {}  // Comment to make it work
};

void f(A a) { printf("hello\n"); }

int main(int, char**) {
  f(2);
  f(3l);
}

/opt/gcc62/bin/g++ -std=gnu++11 explicit.cpp
explicit.cpp: In function ‘int main(int, char**)’:
explicit.cpp:11:6: note:   initializing argument 1 of ‘void f(A)’
 void f(A a) { printf("hello\n"); }
  ^

With either marked constructor commented, compiles correctly and gives the
expected output ("hello" x 2 or ambiguity error).

[Bug c++/65923] New: False positive for warning about literal operator suffix and using

2015-04-28 Thread arnetheduck at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65923

Bug ID: 65923
   Summary: False positive for warning about literal operator
suffix and using
   Product: gcc
   Version: 4.9.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: arnetheduck at gmail dot com
  Target Milestone: ---

In the following snippet, a warning is given when bringing a chrono literal
into the global namespace explicity, but not when importing all literals. Looks
like the warning shouldn't be there, since the two do the same thing, and using
directives are the way to go with literal operators.

cat /tmp/tmp.cc:
#include chrono

using std::literals::chrono_literals::operators;  // warning here
using std::literals;  // no warning here


/usr/local/gcc49/bin/g++ -c -std=c++14 /tmp/tmp.cc:
/tmp/tmp.cc:4:47: warning: literal operator suffixes not preceded by ‘_’ are
reserved for future standardization
 using std::literals::chrono_literals::operators;  // warning here

[Bug bootstrap/64593] libmpfr.a undefined reference to `.L222' when doing make profiledbootstrap with bootstrap-lto

2015-01-14 Thread arnetheduck at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64593

--- Comment #3 from Jacek Sieka arnetheduck at gmail dot com ---
I've run a few more tests, and it turns out the culprit is profiledbootstrap.

'make profiledbootstrap' fails even when bootstrap-lto is taken out from the
configure line. 

Plain 'make' works both with and without bootstrap-lto.


[Bug bootstrap/64593] New: libmpfr.a undefined reference to `.L222' when doing make profiledbootstrap with bootstrap-lto

2015-01-13 Thread arnetheduck at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64593

Bug ID: 64593
   Summary: libmpfr.a undefined reference to  `.L222' when doing
make profiledbootstrap with bootstrap-lto
   Product: gcc
   Version: 4.9.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
  Assignee: unassigned at gcc dot gnu.org
  Reporter: arnetheduck at gmail dot com

Created attachment 34442
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=34442action=edit
Full build log

I just tried building gcc-4.9.2 on SciLin6 with bootstrap-lto and
profiledbootstrap, with in-tree support libraries, and it fails. I've attached
build log and build script used - notable configure options are 
--with-build-config=bootstrap-lto and 

Here's some info:

$ uname -a
Linux csqdev-build03 2.6.32-431.17.1.el6.x86_64 #1 SMP Wed May 7 14:14:17 CDT
2014 x86_64 x86_64 x86_64 GNU/Linux

$ cat stage_current 
stagefeedback

Error:
/home/user/tmp/bld/gcc-4.9.2/./prev-gcc/xg++
-B/home/user/tmp/bld/gcc-4.9.2/./prev-gcc/
-B/home/user/tmp/rtf/x86_64-unknown-linux-gnu/bin/ -nostdinc++
-B/home/user/tmp/bld/gcc-4.9.2/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs
-B/home/user/tmp/bld/gcc-4.9.2/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs

-I/home/user/tmp/bld/gcc-4.9.2/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu

-I/home/user/tmp/bld/gcc-4.9.2/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include
 -I/home/user/tmp/src/gcc-4.9.2/libstdc++-v3/libsupc++
-L/home/user/tmp/bld/gcc-4.9.2/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs
-L/home/user/tmp/bld/gcc-4.9.2/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs
  -g -O2 -flto=jobserver -frandom-seed=1 -ffat-lto-objects -fprofile-use
-DIN_GCC-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall
-Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H
-static-libstdc++ -static-libgcc  -o cc1plus \
  cp/cp-lang.o c-family/stub-objc.o cp/call.o cp/decl.o cp/expr.o
cp/pt.o cp/typeck2.o cp/class.o cp/decl2.o cp/error.o cp/lex.o cp/parser.o
cp/ptree.o cp/rtti.o cp/typeck.o cp/cvt.o cp/except.o cp/friend.o cp/init.o
cp/method.o cp/search.o cp/semantics.o cp/tree.o cp/repo.o cp/dump.o
cp/optimize.o cp/mangle.o cp/cp-objcp-common.o cp/name-lookup.o
cp/cxx-pretty-print.o cp/cp-cilkplus.o cp/cp-gimplify.o cp/cp-array-notation.o
cp/lambda.o cp/vtable-class-hierarchy.o attribs.o incpath.o c-family/c-common.o
c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o
c-family/c-gimplify.o c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o
c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o
c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o
c-family/c-cilkplus.o c-family/array-notation-common.o c-family/cilk.o
c-family/c-ubsan.o i386-c.o glibc-c.o cc1plus-checksum.o libbackend.a main.o 
libcommon-target.a libcommon.a ../libcpp/libcpp.a
../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a  
../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a
../libdecnumber/libdecnumber.a  -L/home/user/tmp/bld/gcc-4.9.2/./cloog/.libs 
-lcloog-isl -L/home/user/tmp/bld/gcc-4.9.2/./isl/.libs  -lisl
-L/home/user/tmp/bld/gcc-4.9.2/./gmp/.libs
-L/home/user/tmp/bld/gcc-4.9.2/./mpfr/src/.libs
-L/home/user/tmp/bld/gcc-4.9.2/./mpc/src/.libs -lmpc -lmpfr -lgmp -rdynamic
-ldl  -L../zlib -lz
/home/user/tmp/bld/gcc-4.9.2/./mpfr/src/.libs/libmpfr.a(round_prec.o):(.debug_info+0xe97):
undefined reference to `.L222'
collect2: error: ld returned 1 exit status
make[3]: *** [lto1] Error 1
make[3]: *** Waiting for unfinished jobs
/home/user/tmp/bld/gcc-4.9.2/./mpfr/src/.libs/libmpfr.a(round_prec.o):(.debug_info+0xe97):
undefined reference to `.L222'
collect2: error: ld returned 1 exit status
make[3]: *** [cc1] Error 1
/home/user/tmp/bld/gcc-4.9.2/./mpfr/src/.libs/libmpfr.a(round_prec.o):(.debug_info+0xe97):
undefined reference to `.L222'
collect2: error: ld returned 1 exit status
make[3]: *** [cc1plus] Error 1
rm gcc.pod
make[3]: Leaving directory `/home/user/tmp/bld/gcc-4.9.2/gcc'
make[2]: *** [all-stagefeedback-gcc] Error 2
make[2]: Leaving directory `/home/user/tmp/bld/gcc-4.9.2'
make[1]: *** [stagefeedback-bubble] Error 2
make[1]: Leaving directory `/home/user/tmp/bld/gcc-4.9.2'
make: *** [profiledbootstrap] Error 2


[Bug bootstrap/64594] New: libmpfr.a undefined reference to `.L222' when doing make profiledbootstrap with bootstrap-lto

2015-01-13 Thread arnetheduck at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64594

Bug ID: 64594
   Summary: libmpfr.a undefined reference to  `.L222' when doing
make profiledbootstrap with bootstrap-lto
   Product: gcc
   Version: 4.9.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
  Assignee: unassigned at gcc dot gnu.org
  Reporter: arnetheduck at gmail dot com

I just tried building gcc-4.9.2 on SciLin6 with bootstrap-lto and
profiledbootstrap, with in-tree support libraries, and it fails. I've attached
build log and build script used - notable configure options are 
--with-build-config=bootstrap-lto and 

Here's some info:

$ uname -a
Linux csqdev-build03 2.6.32-431.17.1.el6.x86_64 #1 SMP Wed May 7 14:14:17 CDT
2014 x86_64 x86_64 x86_64 GNU/Linux

$ cat stage_current 
stagefeedback

Error:
/home/user/tmp/bld/gcc-4.9.2/./prev-gcc/xg++
-B/home/user/tmp/bld/gcc-4.9.2/./prev-gcc/
-B/home/user/tmp/rtf/x86_64-unknown-linux-gnu/bin/ -nostdinc++
-B/home/user/tmp/bld/gcc-4.9.2/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs
-B/home/user/tmp/bld/gcc-4.9.2/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs

-I/home/user/tmp/bld/gcc-4.9.2/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu

-I/home/user/tmp/bld/gcc-4.9.2/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include
 -I/home/user/tmp/src/gcc-4.9.2/libstdc++-v3/libsupc++
-L/home/user/tmp/bld/gcc-4.9.2/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs
-L/home/user/tmp/bld/gcc-4.9.2/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs
  -g -O2 -flto=jobserver -frandom-seed=1 -ffat-lto-objects -fprofile-use
-DIN_GCC-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall
-Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H
-static-libstdc++ -static-libgcc  -o cc1plus \
  cp/cp-lang.o c-family/stub-objc.o cp/call.o cp/decl.o cp/expr.o
cp/pt.o cp/typeck2.o cp/class.o cp/decl2.o cp/error.o cp/lex.o cp/parser.o
cp/ptree.o cp/rtti.o cp/typeck.o cp/cvt.o cp/except.o cp/friend.o cp/init.o
cp/method.o cp/search.o cp/semantics.o cp/tree.o cp/repo.o cp/dump.o
cp/optimize.o cp/mangle.o cp/cp-objcp-common.o cp/name-lookup.o
cp/cxx-pretty-print.o cp/cp-cilkplus.o cp/cp-gimplify.o cp/cp-array-notation.o
cp/lambda.o cp/vtable-class-hierarchy.o attribs.o incpath.o c-family/c-common.o
c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o
c-family/c-gimplify.o c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o
c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o
c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o
c-family/c-cilkplus.o c-family/array-notation-common.o c-family/cilk.o
c-family/c-ubsan.o i386-c.o glibc-c.o cc1plus-checksum.o libbackend.a main.o 
libcommon-target.a libcommon.a ../libcpp/libcpp.a
../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a  
../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a
../libdecnumber/libdecnumber.a  -L/home/user/tmp/bld/gcc-4.9.2/./cloog/.libs 
-lcloog-isl -L/home/user/tmp/bld/gcc-4.9.2/./isl/.libs  -lisl
-L/home/user/tmp/bld/gcc-4.9.2/./gmp/.libs
-L/home/user/tmp/bld/gcc-4.9.2/./mpfr/src/.libs
-L/home/user/tmp/bld/gcc-4.9.2/./mpc/src/.libs -lmpc -lmpfr -lgmp -rdynamic
-ldl  -L../zlib -lz
/home/user/tmp/bld/gcc-4.9.2/./mpfr/src/.libs/libmpfr.a(round_prec.o):(.debug_info+0xe97):
undefined reference to `.L222'
collect2: error: ld returned 1 exit status
make[3]: *** [lto1] Error 1
make[3]: *** Waiting for unfinished jobs
/home/user/tmp/bld/gcc-4.9.2/./mpfr/src/.libs/libmpfr.a(round_prec.o):(.debug_info+0xe97):
undefined reference to `.L222'
collect2: error: ld returned 1 exit status
make[3]: *** [cc1] Error 1
/home/user/tmp/bld/gcc-4.9.2/./mpfr/src/.libs/libmpfr.a(round_prec.o):(.debug_info+0xe97):
undefined reference to `.L222'
collect2: error: ld returned 1 exit status
make[3]: *** [cc1plus] Error 1
rm gcc.pod
make[3]: Leaving directory `/home/user/tmp/bld/gcc-4.9.2/gcc'
make[2]: *** [all-stagefeedback-gcc] Error 2
make[2]: Leaving directory `/home/user/tmp/bld/gcc-4.9.2'
make[1]: *** [stagefeedback-bubble] Error 2
make[1]: Leaving directory `/home/user/tmp/bld/gcc-4.9.2'
make: *** [profiledbootstrap] Error 2


[Bug bootstrap/64593] libmpfr.a undefined reference to `.L222' when doing make profiledbootstrap with bootstrap-lto

2015-01-13 Thread arnetheduck at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64593

--- Comment #1 from Jacek Sieka arnetheduck at gmail dot com ---
*** Bug 64594 has been marked as a duplicate of this bug. ***


[Bug bootstrap/64594] libmpfr.a undefined reference to `.L222' when doing make profiledbootstrap with bootstrap-lto

2015-01-13 Thread arnetheduck at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64594

Jacek Sieka arnetheduck at gmail dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #1 from Jacek Sieka arnetheduck at gmail dot com ---
double post

*** This bug has been marked as a duplicate of bug 64593 ***


[Bug bootstrap/64593] libmpfr.a undefined reference to `.L222' when doing make profiledbootstrap with bootstrap-lto

2015-01-13 Thread arnetheduck at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64593

--- Comment #2 from Jacek Sieka arnetheduck at gmail dot com ---
Created attachment 34443
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=34443action=edit
Build script with configure options


[Bug bootstrap/61440] Bootstrap failure with --with-build-config=bootstrap-lto

2014-12-01 Thread arnetheduck at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61440

Jacek Sieka arnetheduck at gmail dot com changed:

   What|Removed |Added

 CC||arnetheduck at gmail dot com

--- Comment #3 from Jacek Sieka arnetheduck at gmail dot com ---
I'm seeing the same issue with 4.9.2 and bootstrap-lto. 

Trying to compile with binutils 2.24 (self built), gcc-4.9.2 on Fedora 20 (gcc
version 4.8.3 20140911 (Red Hat 4.8.3-7) (GCC)) (based on compile script here:
http://joelinoff.com/blog/?p=1604#more-1604)

Configure:
configure --disable-cloog-version-check --disable-ppl-version-check
--enable-cloog-backend=isl --enable-gold=default --enable-languages=c,c++
--enable-lto --enable-libssp --enable-plugins --enable-plugin
--disable-multilib --with-build-config=bootstrap-lto
--prefix=/home/jacek.sieka/Downloads/rtf
--with-cloog=/home/jacek.sieka/Downloads/rtf
--with-gmp=/home/jacek.sieka/Downloads/rtf
--with-mlgmp=/home/jacek.sieka/Downloads/rtf
--with-mpc=/home/jacek.sieka/Downloads/rtf
--with-mpfr=/home/jacek.sieka/Downloads/rtf
--with-ppl=/home/jacek.sieka/Downloads/rtf


Error:
Comparing stages 2 and 3
warning: gcc/cc1plus-checksum.o differs
warning: gcc/cc1-checksum.o differs
Bootstrap comparison failure!
gcc/tree-vrp.o differs
gcc/cfgloop.o differs
gcc/regcprop.o differs
gcc/lto-cgraph.o differs
gcc/build/genconfig.o differs
gcc/build/genpeep.o differs
gcc/except.o differs
gcc/cgraphunit.o differs
gcc/cfgrtl.o differs
gcc/tree-switch-conversion.o differs
gcc/ipa-devirt.o differs
gcc/emit-rtl.o differs
gcc/gimple.o differs
gcc/sel-sched.o differs
gcc/omp-low.o differs
gcc/dwarf2cfi.o differs
gcc/i386.o differs
gcc/reload1.o differs
gcc/tree-ssa-loop-ivcanon.o differs
gcc/tree-inline.o differs
gcc/dwarf2out.o differs
gcc/tree-ssa-uninit.o differs
gcc/varasm.o differs
gcc/tree-eh.o differs
gcc/function.o differs
gcc/ipa-inline-analysis.o differs
gcc/tree-ssa-pre.o differs
gcc/lto-streamer-out.o differs
gcc/cfgloopmanip.o differs
gcc/dbxout.o differs
gcc/cp/pt.o differs
gcc/cp/semantics.o differs
gcc/cp/parser.o differs
gcc/cp/name-lookup.o differs
gcc/cp/cp-gimplify.o differs
gcc/cp/class.o differs
gcc/cfgexpand.o differs
gcc/tree-outof-ssa.o differs
gcc/coverage.o differs
gcc/sel-sched-ir.o differs
gcc/tree-ssa-propagate.o differs
gcc/tree-sra.o differs
gcc/tree-cfg.o differs
gcc/gimple-low.o differs
gcc/c-family/c-pragma.o differs
gcc/c-family/c-ada-spec.o differs
gcc/c/c-parser.o differs
gcc/c/c-typeck.o differs
gcc/tree.o differs
libcpp/lex.o differs


Sample stage 2-3 diff:
[~/Downloads/bld/gcc-4.9.2]$ readelf -S stage2-gcc/tree.o  /tmp/tree-s2
[~/Downloads/bld/gcc-4.9.2]$ readelf -S stage3-gcc/tree.o  /tmp/tree-s3
[~/Downloads/bld/gcc-4.9.2]$ diff -u /tmp/tree-s2 /tmp/tree-s3
--- /tmp/tree-s22014-12-02 09:35:10.629770887 +0800
+++ /tmp/tree-s32014-12-02 09:35:15.189781714 +0800
@@ -862,22 +862,22 @@
   [428] .gnu.lto_.refs.0  PROGBITS   000a8966
0b61     E   0 0 1
   [429] .gnu.lto_.decls.0 PROGBITS   000a94c7
-   000669b9     E   0 0 1
-  [430] .gnu.lto_.symtab. PROGBITS   0010fe80
+   000669a7     E   0 0 1
+  [430] .gnu.lto_.symtab. PROGBITS   0010fe6e
5b46     E   0 0 1
-  [431] .gnu.lto_.optsPROGBITS   001159c6
+  [431] .gnu.lto_.optsPROGBITS   001159b4
00a2     E   0 0 1
-  [432] .text.unlikelyPROGBITS   00115a68
+  [432] .text.unlikelyPROGBITS   00115a56
    AX   0 0 2
-  [433] .text.unlikely._Z PROGBITS   00115a68
+  [433] .text.unlikely._Z PROGBITS   00115a56
   AXG   0 0 2
-  [434] .text._ZN19simple PROGBITS   00115a70
+  [434] .text._ZN19simple PROGBITS   00115a60
0002   AXG   0 0 16
-  [435] .rodata.str1.8PROGBITS   00115a78
+  [435] .rodata.str1.8PROGBITS   00115a68
02d3  0001 AMS   0 0 8
-  [436] .text.unlikely._Z PROGBITS   00115d4c
+  [436] .text.unlikely._Z PROGBITS   00115d3c
   AXG   0 0 2
-  [437] .text._ZN19simple PROGBITS   00115d50
+  [437] .text._ZN19simple PROGBITS   00115d40
0005   AXG   0

[Bug bootstrap/61440] Bootstrap failure with --with-build-config=bootstrap-lto

2014-12-01 Thread arnetheduck at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61440

--- Comment #4 from Jacek Sieka arnetheduck at gmail dot com ---
This looks very similar to 62077 btw.


[Bug c++/56135] New: [c++11] this incorrectly captured as null in template member function

2013-01-28 Thread arnetheduck at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56135



 Bug #: 56135

   Summary: [c++11] this incorrectly captured as null in template

member function

Classification: Unclassified

   Product: gcc

   Version: 4.7.2

Status: UNCONFIRMED

  Severity: normal

  Priority: P3

 Component: c++

AssignedTo: unassig...@gcc.gnu.org

ReportedBy: arnethed...@gmail.com





Created attachment 29298

  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=29298

Test case showing broken capture of this



When creating a lambda function in a template member function, when capturing

this using [=], this is not captured correctly when the lambda only calls

another template member function reusing the outer template argument.



Qualifying the call with this or not passing on the outer template argument

solves the issue.



In the attached code, I expect this to be captured in all 4 cases, but the

broken captures null resulting in the print out:



./test

(nil)

0x7fff1354f2af

0x7fff1354f2af

0x7fff1354f2af



GDB shows the same - this has been captured but with null as value.



clang 3.2 captures this as expected.


[Bug c++/53892] New: Invalid duplicate case value for C++11 utf-16 char literals

2012-07-08 Thread arnetheduck at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53892

 Bug #: 53892
   Summary: Invalid duplicate case value for C++11 utf-16 char
literals
Classification: Unclassified
   Product: gcc
   Version: 4.7.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: arnethed...@gmail.com


In the following C++ function:

void f(char16_t c) {
switch(c) {
case u'\u':
case u'\u0001':
break;
}
}

G++, when invoked with g++ -std=gnu++11 test.cpp gives the following
unexpected error message:

test.cpp: In function ‘void f(char16_t)’:
test.cpp:5:5: error: duplicate case value
test.cpp:4:5: error: previously used here

Lines 4  5 are the two case values. 

Changing either of the values to u'\u0002' makes the code compile correctly.