[Bug c++/64697] C++11 thread_local: relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS init function for N::ptd'

2020-03-26 Thread vhaisman at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64697

--- Comment #23 from Václav Haisman  ---
I am not sure what to report. I do not understand the background of linker and
relocations enough. Also, I don't have access to Windows and Cygwin any more.

[Bug c++/64697] C++11 thread_local: relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS init function for N::ptd'

2018-06-26 Thread vhaisman at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64697

--- Comment #20 from Václav Haisman  ---
Still an issue in 2018 with GCC 7.3.0.

[Bug c++/64697] C++11 thread_local: relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS init function for N::ptd'

2017-01-26 Thread vhaisman at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64697

--- Comment #19 from Václav Haisman  ---
There appears to be some sort of interaction with the `inline` attribute of the
`get_ptd()` function. If the `get_ptd()` function is just declared `extern` in
`def.hxx` and defined in `def.cxx`, the link error goes away.

[Bug c++/64697] C++11 thread_local: relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS init function for N::ptd'

2017-01-25 Thread vhaisman at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64697

--- Comment #18 from Václav Haisman  ---
And I have just verified it is still the same with GCC 6.3.0.

[Bug c++/64697] C++11 thread_local: relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS init function for N::ptd'

2017-01-24 Thread vhaisman at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64697

--- Comment #17 from Václav Haisman  ---
This is still an issue in 2017 with GCC 5.4.0.

[Bug c++/64697] C++11 thread_local: relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS init function for N::ptd'

2016-03-19 Thread vhaisman at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64697

Václav Haisman  changed:

   What|Removed |Added

Version|4.9.2   |5.3.0

--- Comment #16 from Václav Haisman  ---
And this still fails for me with GCC 5.3:

`--> ./build.sh
+ g++ -std=gnu++11 -fvisibility=hidden -c use.cxx def.cxx
+ g++ -shared -o cygtest.dll use.o def.o
use.o:use.cxx:(.text$_ZTWN1N3ptdE[_ZTWN1N3ptdE]+0x15): relocation truncated to
fit: R_X86_64_PC32 against undefined symbol `TLS init function for N::ptd'
collect2: error: ld returned 1 exit status
.-(~/log4cplus-git/tls-test-case)
`--> g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/5.3.0/lto-wrapper.exe
Target: x86_64-pc-cygwin
Configured with:
/cygdrive/i/szsz/tmpp/gcc/gcc-5.3.0-3.x86_64/src/gcc-5.3.0/configure
--srcdir=/cygdrive/i/szsz/tmpp/gcc/gcc-5.3.0-3.x86_64/src/gcc-5.3.0
--prefix=/usr --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc
--docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C
--build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin
--without-libiconv-prefix --without-libintl-prefix --libexecdir=/usr/lib
--enable-shared --enable-shared-libgcc --enable-static
--enable-version-specific-runtime-libs --enable-bootstrap --enable-__cxa_atexit
--with-dwarf2 --with-tune=generic
--enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ --enable-graphite
--enable-threads=posix --enable-libatomic --enable-libcilkrts --enable-libgomp
--enable-libitm --enable-libquadmath --enable-libquadmath-support
--enable-libssp --enable-libada --enable-libgcj-sublibs --disable-java-awt
--disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld
--with-gnu-as --with-cloog-include=/usr/include/cloog-isl
--without-libiconv-prefix --without-libintl-prefix --with-system-zlib
--enable-linker-build-id --with-default-libstdcxx-abi=gcc4-compatible
Thread model: posix
gcc version 5.3.0 (GCC)

[Bug other/17239] gcc_update not being writable while it is running

2016-03-19 Thread vhaisman at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=17239

Václav Haisman  changed:

   What|Removed |Added

Version|5.3.0   |4.0.0

--- Comment #3 from Václav Haisman  ---
Bugzilla is evil. I am reverting the previous unintentional change.

[Bug c++/64697] C++11 thread_local: relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS init function for N::ptd'

2016-02-09 Thread vhaisman at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64697

--- Comment #11 from Václav Zeman  ---
Created attachment 37638
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37638=edit
logs of compilation with -fno-lto

(In reply to H.J. Lu from comment #8)
> Your compiler doesn't have proper LTO support.  Please turn it
> off with -fno-lto.


[Bug c++/64697] C++11 thread_local: relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS init function for N::ptd'

2016-02-09 Thread vhaisman at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64697

--- Comment #13 from Václav Haisman  ---
Created attachment 37643
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37643=edit
objdump -r use.o log

(In reply to H.J. Lu from comment #12)
> Please provide the output of "objdump -r use.o".

[Bug c++/64697] C++11 thread_local: relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS init function for N::ptd'

2016-02-09 Thread vhaisman at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64697

--- Comment #14 from Václav Haisman  ---
Created attachment 37644
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37644=edit
objdump -Ttr def.o log

`objdump -Ttr def.o` in advance, just in case it is relevant.

[Bug c++/64697] C++11 thread_local: relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS init function for N::ptd'

2016-02-08 Thread vhaisman at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64697

--- Comment #9 from Václav Zeman  ---
(In reply to H.J. Lu from comment #8)
> Your compiler doesn't have proper LTO support.  Please turn it
> off with -fno-lto.

How/why is it improper?

[Bug c++/64697] C++11 thread_local: relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS init function for N::ptd'

2016-02-08 Thread vhaisman at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64697

--- Comment #6 from Václav Zeman  ---
Created attachment 37630
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37630=edit
logs requested by #5 comment

Here is the linking -v output and ld -V output.

[Bug c++/64697] C++11 thread_local: relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS init function for N::ptd'

2016-02-08 Thread vhaisman at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64697

--- Comment #7 from Václav Zeman  ---
Created attachment 37631
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37631=edit
logs after complete recompilation

logs after complete recompilation

[Bug c++/35167] problem with function address constant non-type template parameter in template

2015-03-09 Thread vhaisman at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35167

Václav Zeman vhaisman at gmail dot com changed:

   What|Removed |Added

 Target|i386-portbld-freebsd6.3 |
   Host|i386-portbld-freebsd6.3 |
Version|4.3.0   |4.9.1
  Known to fail||4.9.1
  Build|i386-portbld-freebsd6.3 |

--- Comment #10 from Václav Zeman vhaisman at gmail dot com ---
This still fails in 4.9.1.

[Bug c++/60367] Default argument object is not getting constructed

2015-03-03 Thread vhaisman at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60367

Václav Zeman vhaisman at gmail dot com changed:

   What|Removed |Added

 CC||vhaisman at gmail dot com

--- Comment #13 from Václav Zeman vhaisman at gmail dot com ---
This bug appears to be affecting 4.7.x series as well. Is there a chance to get
this fixed for 4.7 as well?

http://stackoverflow.com/questions/28837142/stdmap-argument-with-default-empty-map-segfaults-in-gcc

[Bug c++/64697] New: C++11 thread_local: relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS init function for N::ptd'

2015-01-20 Thread vhaisman at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64697

Bug ID: 64697
   Summary: C++11 thread_local: relocation truncated to fit:
R_X86_64_PC32 against undefined symbol `TLS init
function for N::ptd'
   Product: gcc
   Version: 4.9.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vhaisman at gmail dot com

I have hit an issue with thread-local storage variables on
Cygwin/AMD64, I do not see it with Cygwin/i686.

I am having linking issues when using `thread_local` keyword in Cygwin
with its GCC 4.8.3 and GCC 4.9.2. This is derived from log4cplus. The
test case is split into three files:

File def.hxx:


#include string

namespace N
{
  struct S { std::string str; };
  // extern declaration in a header
  extern thread_local S * ptd;

  // accessing the extern declared ptd here
  inline
  S * get_ptd ()
  {
if (! ptd)
  ptd = new S;
return ptd;
  }
} // namespace N


File def.cxx:


#include def.hxx

namespace N
{
  // definition of ptd
  thread_local S * ptd = nullptr;
} // namespace N
~~~

File use.cxx:


#include def.hxx

namespace N
{
  __declspec(dllexport)
  void * foo ()
  {
// invoking inline get_ptd() function to get the value in ptd
return get_ptd ();
  }
}


Now, when I compile each .cxx with `g++ -std=gnu++11
-fvisibility=hidden -c use.cxx def.cxx` and then try to link with `g++
-shared -o cygtest.dll use.o def.o`, I get the following error from
linker:


use.o:use.cxx:(.text$_ZTWN1N3ptdE[_ZTWN1N3ptdE]+0x15): relocation
truncated to fit: R_X86_64_PC32 against undefined symbol `TLS init
function for N::ptd'
collect2: error: ld returned 1 exit status


The nm -C ./def.o output confirms that:


`-- nm -C ./def.o
 b .bss
 d .data
 r .rdata
 r .rdata$zzz
 t .text
0008 r __emutls_t._ZN1N3ptdE
 D __emutls_v._ZN1N3ptdE
 r std::piecewise_construct


As you can see, the ptd thread-local variable initialization function
is not defined anywhere. The use.o references this initialization
function (see bottom of the listing):


`-- nm -C ./use.o
 b .bss
 d .data
 i .drectve
 p .pdata
 p .pdata$_ZN1N1SC1Ev
 p .pdata$_ZN1N7get_ptdEv
 p .pdata$_ZTWN1N3ptdE
 r .rdata
 r .rdata$.refptr.__emutls_v._ZN1N3ptdE
 r .rdata$.refptr._ZTHN1N3ptdE
 r .rdata$zzz
 R .refptr.__emutls_v._ZN1N3ptdE
 R .refptr._ZTHN1N3ptdE
 t .text
 t .text$_ZN1N1SC1Ev
 t .text$_ZN1N7get_ptdEv
 t .text$_ZTWN1N3ptdE
 A .weak._ZTHN1N3ptdE._ZN1N1SC1Ev
 r .xdata
 r .xdata$_ZN1N1SC1Ev
 r .xdata$_ZN1N7get_ptdEv
 r .xdata$_ZTWN1N3ptdE
 U __emutls_get_address
 U __emutls_v._ZN1N3ptdE
 U __gxx_personality_seh0
 U __real__ZdlPv
 U __real__Znwm
 U _Unwind_Resume
 U operator delete(void*)
 T N::S::S()
 T N::foo()
 T N::get_ptd()
 U std::basic_stringchar, std::char_traitschar,
std::allocatorchar ::basic_string()
 U operator new(unsigned long)
 r std::piecewise_construct
 w TLS init function for N::ptd
 T TLS wrapper function for N::ptd


Now, this code seems to work well on Linux with both GCC and Clang.

Is this a GCC problem on Cygwin?
Am I using extern thread_local wrong?

My experiments show that not using the extern keyword seems to fix the
issue. But I am not sure if that does not introduce two ptd
thread-local variables in two TUs.

See also http://stackoverflow.com/q/28023728/341065


[Bug c++/64697] C++11 thread_local: relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS init function for N::ptd'

2015-01-20 Thread vhaisman at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64697

--- Comment #1 from Václav Zeman vhaisman at gmail dot com ---
Created attachment 34503
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=34503action=edit
def.hxx

[Bug c++/64697] C++11 thread_local: relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS init function for N::ptd'

2015-01-20 Thread vhaisman at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64697

--- Comment #2 from Václav Zeman vhaisman at gmail dot com ---
Created attachment 34504
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=34504action=edit
def.cxx

[Bug c++/64697] C++11 thread_local: relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS init function for N::ptd'

2015-01-20 Thread vhaisman at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64697

--- Comment #3 from Václav Zeman vhaisman at gmail dot com ---
Created attachment 34505
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=34505action=edit
use.cxx

[Bug c++/63779] g++ 4.9 generates invalid object provoking a GOT relative relocation must reference a local symbol linker error on SunOS

2015-01-03 Thread vhaisman at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63779

--- Comment #4 from Václav Zeman vhaisman at gmail dot com ---
I think I am experiencing same or similar issue with GCC 4.8.2 on Oracle
Solaris 11.2 Express (i386). This is a snippet from log4cplus build. Almost all
of these are related to __gthread* symbols but I also get some typeinfo symbols
there.

ld: fatal: relocation error: R_386_GOTOFF: file
src/.libs/liblog4cplus_la-global-init.o: symbol __gthread_active: a GOT
relative relocation must reference a local symbol
ld: fatal: relocation error: R_386_GOTOFF: file
src/.libs/liblog4cplus_la-global-init.o: symbol
__gthread_active_p()::__gthread_active_mutex: a GOT relative relocation must
reference a local symbol

[Bug c++/63779] g++ 4.9 generates invalid object provoking a GOT relative relocation must reference a local symbol linker error on SunOS

2015-01-03 Thread vhaisman at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63779

--- Comment #6 from Václav Zeman vhaisman at gmail dot com ---
Created attachment 34370
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=34370action=edit
preprocessed source for global-init.cxx

[Bug c++/63779] g++ 4.9 generates invalid object provoking a GOT relative relocation must reference a local symbol linker error on SunOS

2015-01-03 Thread vhaisman at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63779

--- Comment #7 from Václav Zeman vhaisman at gmail dot com ---
Created attachment 34371
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=34371action=edit
resulting .o file

[Bug c++/63779] g++ 4.9 generates invalid object provoking a GOT relative relocation must reference a local symbol linker error on SunOS

2015-01-03 Thread vhaisman at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63779

--- Comment #5 from Václav Zeman vhaisman at gmail dot com ---
Created attachment 34369
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=34369action=edit
assembler source

[Bug libstdc++/62200] New: libstdc++ initialization priority

2014-08-20 Thread vhaisman at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62200

Bug ID: 62200
   Summary: libstdc++ initialization priority
   Product: gcc
   Version: 4.8.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vhaisman at gmail dot com

I am trying to initialize my library early using the `init_priority` attribute.
Some paths of my library's initialization might try to print warnings and/or
errors. I have hit a SIGSEGV with the following test case, which uses
std::cerr. According to some, the library should initialize with priority 101.
If this were the case I would expect the test case to work flawlessly.


#include iostream

struct S1
{
S1() { std::cerr  __FUNCTION__  \n; }
} static s1 __attribute__ ((__init_priority__ (65535/2)));


int
main ()
{
  return 0;
}


The stack trace is


#0  0x77b6a559 in std::ostream::sentry::sentry(std::ostream) ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#1  0x77b6ac19 in std::basic_ostreamchar, std::char_traitschar 
std::__ostream_insertchar, std::char_traitschar (std::basic_ostreamchar,
std::char_traitschar , char const*, long)
() from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#2  0x77b6b077 in std::basic_ostreamchar, std::char_traitschar 
std::operator std::char_traitschar (std::basic_ostreamchar,
std::char_traitschar , char const*) ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x0040081d in S1::S1 (this=0x601172 s1) at test.cxx:5
#4  0x004007d6 in __static_initialization_and_destruction_0
(__initialize_p=1, __priority=32767) at test.cxx:6
#5  0x004007eb in _GLOBAL__sub_I.32767_main(void) () at test.cxx:13
#6  0x0040087d in __libc_csu_init ()
#7  0x77731e55 in __libc_start_main (main=0x40077d main(), argc=1,
argv=0x7fffe2c8, init=0x400830 __libc_csu_init, fini=optimized out,
rtld_fini=optimized out,
stack_end=0x7fffe2b8) at libc-start.c:246
#8  0x004006b9 in _start ()



[Bug libstdc++/62200] libstdc++ initialization priority

2014-08-20 Thread vhaisman at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62200

--- Comment #1 from Václav Zeman vhaisman at gmail dot com ---
And it dumps core on Cygwin as well.

[Bug libstdc++/41495] libstdc++ --enable-clocale=ieee_1003.1-2001 fails

2014-08-17 Thread vhaisman at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41495

Václav Zeman vhaisman at gmail dot com changed:

   What|Removed |Added

 CC||vhaisman at gmail dot com

--- Comment #11 from Václav Zeman vhaisman at gmail dot com ---
I have started working on this but I have never finished. If
anybody is interested, the work is available at
https://github.com/wilx/gcc/compare/gcc-mirror:master...posix-2008-locale.
The branch is a bit misnamed because I had to use some Darwin extensions
instead of only POSIX 2008 functions.

[Bug rtl-optimization/49358] optimization regression in 4.7.0, 4.6.1 from 4.5.4

2014-03-23 Thread vhaisman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49358

--- Comment #3 from Václav Zeman vhaisman at gmail dot com ---
And still a problem with gcc version 4.8.1 (Ubuntu/Linaro 4.8.1-10ubuntu9).

[Bug lto/57715] lto1.exe: internal compiler error: in add_symbol_to_partition

2014-03-21 Thread vhaisman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57715

Václav Zeman vhaisman at gmail dot com changed:

   What|Removed |Added

 CC||vhaisman at gmail dot com

--- Comment #3 from Václav Zeman vhaisman at gmail dot com ---
Created attachment 32421
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=32421action=edit
preprocessed source

[Bug lto/57715] lto1.exe: internal compiler error: in add_symbol_to_partition

2014-03-21 Thread vhaisman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57715

--- Comment #4 from Václav Zeman vhaisman at gmail dot com ---
(In reply to Tobias Burnus from comment #2)
 This PR might have the same reason as PR60567.
 
 Namely, your GCC has not been compiled on a system with working linker
 plugin - and thus, lto1 is not invoked with -fresolution=.
 
 Try compiling with -fuse-linker-plugin - if that gives an error, try a GCC
 which has been configured with --with-plugin-ld= pointing to a newer
 Binutils - 2.21 or newer. If that helps, it is a duplicate of PR60567.

I was able to (manually) reduce the test to 

g++  -r -nostdlib  src/.libs/liblog4cplus_la-rootlogger.ii -flto -o
.libs/cyglog4cplus-1-2-2.dll

The preprocessed file is attached compressed.

 
 If it doesn't help: Create a reduced test case as described at
 http://gcc.gnu.org/wiki/A_guide_to_testcase_reduction#Reducing_LTO_bugs

[Bug lto/57715] lto1.exe: internal compiler error: in add_symbol_to_partition

2014-03-21 Thread vhaisman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57715

--- Comment #5 from Václav Zeman vhaisman at gmail dot com ---
(In reply to Václav Zeman from comment #4)
 (In reply to Tobias Burnus from comment #2)
  This PR might have the same reason as PR60567.
  
  Namely, your GCC has not been compiled on a system with working linker
  plugin - and thus, lto1 is not invoked with -fresolution=.
  
  Try compiling with -fuse-linker-plugin - if that gives an error, try a GCC
  which has been configured with --with-plugin-ld= pointing to a newer
  Binutils - 2.21 or newer. If that helps, it is a duplicate of PR60567.
 
 I was able to (manually) reduce the test to 
 
 g++  -r -nostdlib  src/.libs/liblog4cplus_la-rootlogger.ii -flto -o
 .libs/cyglog4cplus-1-2-2.dll
 
 The preprocessed file is attached compressed.
 
  
  If it doesn't help: Create a reduced test case as described at
  http://gcc.gnu.org/wiki/A_guide_to_testcase_reduction#Reducing_LTO_bugs

Oops! All of this should have gone to PR 56963 instead.

[Bug lto/56963] GCC 4.8.0 LTO issue: lto1: internal compiler error: in add_symbol_to_partition, at lto/lto-partition.c:284

2014-03-21 Thread vhaisman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56963

--- Comment #7 from Václav Zeman vhaisman at gmail dot com ---
Created attachment 32422
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=32422action=edit
preprocessed source

[Bug lto/56963] GCC 4.8.0 LTO issue: lto1: internal compiler error: in add_symbol_to_partition, at lto/lto-partition.c:284

2014-03-21 Thread vhaisman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56963

--- Comment #6 from Václav Zeman vhaisman at gmail dot com ---
(In reply to Tobias Burnus from comment #5)
 This PR might have the same reason as PR60567.
 
 Namely, your GCC has not been compiled on a system with working linker
 plugin - and thus, lto1 is not invoked with -fresolution=.
 
 Try compiling with -fuse-linker-plugin - if that gives an error, try a GCC
 which has been configured with --with-plugin-ld= pointing to a newer
 Binutils - 2.21 or newer. If that helps, it is a duplicate of PR60567.

I was able to (manually) reduce the test to 

g++  -r -nostdlib  src/.libs/liblog4cplus_la-rootlogger.ii -flto -o
.libs/cyglog4cplus-1-2-2.dll

The preprocessed file is attached compressed.

 
 If it doesn't help: Create a reduced test case as described at
 http://gcc.gnu.org/wiki/A_guide_to_testcase_reduction#Reducing_LTO_bugs

[Bug lto/56963] GCC 4.8.0 LTO issue: lto1: internal compiler error: in add_symbol_to_partition, at lto/lto-partition.c:284

2014-03-21 Thread vhaisman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56963

--- Comment #8 from Václav Zeman vhaisman at gmail dot com ---
BTW, the current version with which I have reduced the test case is this:

`-- g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-pc-cygwin/4.8.2/lto-wrapper.exe
Target: i686-pc-cygwin
Configured with: /cygdrive/i/szsz/tmpp/gcc4/gcc-4.8.2-2/src/gcc-4.8.2/configure
--srcdir=/cygdrive/i/szsz/tmpp/gcc4/gcc-4.8.2-2/src/gcc-4.8.2 --prefix=/usr
--exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin
--libexecdir=/usr/libexec --datadir=/usr/share --localstatedir=/var
--sysconfdir=/etc --libdir=/usr/lib --datarootdir=/usr/share
--docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C
--build=i686-pc-cygwin --host=i686-pc-cygwin --target=i686-pc-cygwin
--without-libiconv-prefix --without-libintl-prefix --enable-shared
--enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs
--enable-bootstrap --disable-__cxa_atexit --with-dwarf2 --with-arch=i686
--with-tune=generic --disable-sjlj-exceptions
--enable-languages=ada,c,c++,fortran,java,lto,objc,obj-c++ --enable-graphite
--enable-threads=posix --enable-libatomic --enable-libgomp --disable-libitm
--enable-libquadmath --enable-libquadmath-support --enable-libssp
--enable-libada --enable-libjava --enable-libgcj-sublibs --disable-java-awt
--disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld
--with-gnu-as --with-cloog-include=/usr/include/cloog-isl
--without-libiconv-prefix --without-libintl-prefix --with-system-zlib
--libexecdir=/usr/lib
Thread model: posix
gcc version 4.8.2 (GCC)

[Bug lto/56088] [4.8/4.9 Regression] LTO error: error: inlining failed in call to always_inline ‘vswprintf’: recursive inlining

2014-02-15 Thread vhaisman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56088

Václav Zeman vhaisman at gmail dot com changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|WORKSFORME  |---

--- Comment #12 from Václav Zeman vhaisman at gmail dot com ---
(In reply to Yuxuan Shui from comment #11)
 This is still reproducible in GCC 4.8.2 on Gentoo when compiling packages
 like findutils.

I am reopening this then.

[Bug c++/59348] New: ieee_1003.1-2001/messages_members.cc does not compile with _GLIBCXX_USE_WCHAR_T defined

2013-11-29 Thread vhaisman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59348

Bug ID: 59348
   Summary: ieee_1003.1-2001/messages_members.cc does not compile
with _GLIBCXX_USE_WCHAR_T defined
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vhaisman at gmail dot com

Created attachment 31334
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=31334action=edit
patch

The ieee_1003.1-2001/messages_members.cc file does not compile with
_GLIBCXX_USE_WCHAR_T defined. The messageswchar_t::do_get() function is
missing parameter names. Fixing patch is attached.


[Bug c++/58999] sizeof ...(T) is very slow than clang

2013-11-05 Thread vhaisman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58999

--- Comment #2 from Václav Zeman vhaisman at gmail dot com ---
You should probably add the complete test case as an attachment.

[Bug c++/56963] GCC 4.8.0 LTO issue: lto1: internal compiler error: in add_symbol_to_partition, at lto/lto-partition.c:284

2013-04-19 Thread vhaisman at gmail dot com

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

--- Comment #3 from Václav Zeman vhaisman at gmail dot com 2013-04-19 
08:54:59 UTC ---
I have broken the file on the Google Drive. Here is another copy of the same:
https://docs.google.com/file/d/0B-WkLJEfYmSEdTZvdFVRR0E0dEE/edit?usp=sharing

[Bug c++/56963] New: GCC 4.8.0 LTO issue: lto1: internal compiler error: in add_symbol_to_partition, at lto/lto-partition.c:284

2013-04-15 Thread vhaisman at gmail dot com


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



 Bug #: 56963

   Summary: GCC 4.8.0 LTO issue: lto1: internal compiler error: in

add_symbol_to_partition, at lto/lto-partition.c:284

Classification: Unclassified

   Product: gcc

   Version: lto

Status: UNCONFIRMED

  Severity: normal

  Priority: P3

 Component: c++

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

ReportedBy: vhais...@gmail.com





I have tried to compile log4cplus (C++ logging library) on Cygwin64

with -flto GCC option. I am getting the following failure:



lto1: internal compiler error: in add_symbol_to_partition, at

lto/lto-partition.c:284



Here is a link to archive with the minimal amount of .o files and a test.sh

script that reproduce the problem for me.



https://docs.google.com/file/d/0B-WkLJEfYmSEUVVOdm56X1FSNDA/edit?usp=drive_web


[Bug c++/56963] GCC 4.8.0 LTO issue: lto1: internal compiler error: in add_symbol_to_partition, at lto/lto-partition.c:284

2013-04-15 Thread vhaisman at gmail dot com

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

Václav Zeman vhaisman at gmail dot com changed:

   What|Removed |Added

   Keywords||lto
 Target||x86_64-pc-cygwin
 CC||vhaisman at gmail dot com
   Host||x86_64-pc-cygwin
  Known to fail||4.8.0
  Build||x86_64-pc-cygwin

--- Comment #1 from Václav Zeman vhaisman at gmail dot com 2013-04-15 
08:37:39 UTC ---
Link to the original conversation in cygwin-apps@ ml:
http://cygwin.com/ml/cygwin-apps/2013-04/msg00154.html

$ uname -a
CYGWIN_NT-6.1 HAIVA01W7 1.7.18(0.263/5/3) 2013-04-10 14:35 x86_64 Cygwin

$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/4.8.0/lto-wrapper.exe
Target: x86_64-pc-cygwin
Configured with: /usr/src/ports/gcc/gcc-4.8.0-1/src/gcc-4.8.0/configure
--srcdir=/usr/src/ports/gcc/gcc-4.8.0-1/src/gcc-4.8.0 --prefix=/usr
--exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib
--datadir=/usr/share --localstatedir=/var --sysconfdir=/etc
--datarootdir=/usr/share --docdir=/usr/share/doc/gcc -C
--build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin
--without-libiconv-prefix --without-libintl-prefix --enable-shared
--enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs
--enable-bootstrap --disable-__cxa_atexit --with-dwarf2 --with-tune=generic
--enable-languages=c,c++,fortran,lto,objc,obj-c++ --enable-graphite
--enable-threads=posix --enable-libatomic --enable-libgomp --disable-libitm
--enable-libquadmath --enable-libquadmath-support --enable-libssp
--enable-libgcj-sublibs --disable-java-awt --disable-symvers
--with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as
--with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix
--without-libintl-prefix --with-system-zlib
Thread model: posix
gcc version 4.8.0 (GCC)

[Bug c++/56963] GCC 4.8.0 LTO issue: lto1: internal compiler error: in add_symbol_to_partition, at lto/lto-partition.c:284

2013-04-15 Thread vhaisman at gmail dot com

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

--- Comment #2 from Václav Zeman vhaisman at gmail dot com 2013-04-15 
08:39:40 UTC ---
None of the tricks (-fno-reorder-blocks, -r, -nostdlib) help here. It still
fails the same way.

[Bug lto/56088] [4.8/4.9 Regression] LTO error: error: inlining failed in call to always_inline ‘vswprintf’: recursive inlining

2013-03-22 Thread vhaisman at gmail dot com

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

Václav Zeman vhaisman at gmail dot com changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution||WORKSFORME

--- Comment #10 from Václav Zeman vhaisman at gmail dot com 2013-03-22 
14:57:19 UTC ---
I could not reproduce this with newer snapshots.

[Bug lto/56088] [4.8 Regression] LTO error: error: inlining failed in call to always_inline ‘vswprintf’: recursive inlining

2013-01-28 Thread vhaisman at gmail dot com

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

--- Comment #8 from Václav Zeman vhaisman at gmail dot com 2013-01-28 
20:12:49 UTC ---
(In reply to comment #7)
 What linker are you using?  It seems to work for me with GNU ld 2.23.1.
 
 Using
 
  ./xg++ -B. t2.ii -r -nostdlib -flto -std=c++11 -march=amdfam10 -mfxsr -fPIC 
  -O3 -flto-partition=none -fuse-linker-plugin
 
 and preprocessed source.  Did you use the same flags compiling timehelper.o?
I am seeing this when I add -Wl,-v to command line:

/usr/bin/ld.gold -plugin
/home/wilx/gcc48/libexec/gcc/x86_64-linux-gnu/4.8.0/liblto_plugin.so
-plugin-opt=/home/wilx/gcc48/libexec/gcc/x86_64-linux-gnu/4.8.0/lto-wrapper
-plugin-opt=-fresolution=/tmp/cchgMTW0.res --sysroot=/ --eh-frame-hdr -m
elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o out.so -r
-L/home/wilx/gcc48/lib/gcc/x86_64-linux-gnu/4.8.0
-L/home/wilx/gcc48/lib/gcc/x86_64-linux-gnu/4.8.0/../../../../lib64
-L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu
-L/usr/lib/../lib64 -L/home/wilx/gcc48/lib/gcc/x86_64-linux-gnu/4.8.0/../../..
-v ./timehelper.o
GNU gold (GNU Binutils for Ubuntu 2.22.90.20120924) 1.11 g++-4.8
@/tmp/cc2L4QqZ.args


[Bug c++/56088] New: LTO error: error: inlining failed in call to always_inline ‘vswprintf’: recursive inlining

2013-01-23 Thread vhaisman at gmail dot com

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

 Bug #: 56088
   Summary: LTO error: error: inlining failed in call to
always_inline ‘vswprintf’: recursive inlining
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: vhais...@gmail.com


Created attachment 29258
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=29258
bug sources

I am seeing the following compilation/linking error that I am not seeing with
non-LTO builds:

--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8
In file included from :256:0:
/usr/include/x86_64-linux-gnu/bits/wchar2.h: In function
‘_ZN9__gnu_cxx12__to_xstringISbIwSt11char_traitsIwESaIwEEwEET_PFiPT0_mPKS6_P13__va_list_tagEmS9_z.constprop.0’:
/usr/include/x86_64-linux-gnu/bits/wchar2.h:316:28: error: inlining failed in
call to always_inline ‘vswprintf’: recursive inlining
 __NTH (vswprintf (wchar_t *__restrict __s, size_t __n,
^
In file included from
/home/wilx/gcc48/include/c++/4.8.0/bits/stl_algobase.h:3320:0,
 from :1177:
/usr/include/x86_64-linux-gnu/bits/wchar2.h:322:50: error: called from here
   return __vswprintf_alias (__s, __n, __fmt, __ap);
  ^
lto-wrapper: g++-4.8 returned 1 exit status
/usr/bin/ld.gold: fatal error: lto-wrapper failed
collect2: error: ld returned 1 exit status
--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8

I am attaching the single .o file that reproduces the problem for me. Here is a
command line that causes it for me:

g++-4.8 -v -fPIC -DPIC -r -nostdlib ./timehelper.o -march=native -O3 -flto
-flto-partition=none -fuse-linker-plugin -o out.so


[Bug c++/56088] LTO error: error: inlining failed in call to always_inline ‘vswprintf’: recursive inlining

2013-01-23 Thread vhaisman at gmail dot com

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

--- Comment #1 from Václav Zeman vhaisman at gmail dot com 2013-01-23 
20:45:10 UTC ---
Created attachment 29259
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=29259
output log


[Bug c++/56088] LTO error: error: inlining failed in call to always_inline ‘vswprintf’: recursive inlining

2013-01-23 Thread vhaisman at gmail dot com

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

--- Comment #2 from Václav Zeman vhaisman at gmail dot com 2013-01-23 
20:47:01 UTC ---
GCC information detail:

amber2::wilx:~/log4cplus-bzr/work-trunk/objdir/lto-bug g++-4.8 -v
Using built-in specs.
COLLECT_GCC=g++-4.8
COLLECT_LTO_WRAPPER=/home/wilx/gcc48/libexec/gcc/x86_64-linux-gnu/4.8.0/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../trunk/configure -v --with-pkgversion='wilx/amber2 custom
build' --enable-languages=c,c++,go,fortran,objc,obj-c++
--prefix=/home/wilx/gcc48 --program-suffix=-4.8 --enable-shared
--enable-linker-build-id --with-system-zlib --without-included-gettext
--enable-threads=posix --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=rt --enable-gnu-unique-object
--enable-lto --enable-plugin --enable-objc-gc --disable-werror
--with-arch-32=i686 --with-tune=generic --enable-checking=release
--build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
--with-gmp=/usr --with-mpc=/usr --with-mpfr=/usr --with-cloog=/usr GNAT=gnatgcc
--enable-bootstrap LD=ld.gold
Thread model: posix
gcc version 4.8.0 20130123 (experimental) [trunk revision 195409] (wilx/amber2
custom build) 

This was built from svn://gcc.gnu.org/svn/gcc/trunk at revision 195409.


[Bug lto/56088] LTO error: error: inlining failed in call to always_inline ‘vswprintf’: recursive inlining

2013-01-23 Thread vhaisman at gmail dot com

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

--- Comment #4 from Václav Zeman vhaisman at gmail dot com 2013-01-23 
20:53:52 UTC ---
Created attachment 29260
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=29260
preprocessed source of timehelper.cxx

Here is the preprocessed source.


[Bug lto/56088] LTO error: error: inlining failed in call to always_inline ‘vswprintf’: recursive inlining

2013-01-23 Thread vhaisman at gmail dot com

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

--- Comment #5 from Václav Zeman vhaisman at gmail dot com 2013-01-23 
22:20:16 UTC ---
(In reply to comment #3)
 Can you provide the preprocessed source that was used to generate 
 timehelper.o?
Done.


[Bug rtl-optimization/55952] New: x86 FPU, unnecessary fxch instruction

2013-01-11 Thread vhaisman at gmail dot com


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



 Bug #: 55952

   Summary: x86 FPU, unnecessary fxch instruction

Classification: Unclassified

   Product: gcc

   Version: 4.7.2

Status: UNCONFIRMED

  Severity: normal

  Priority: P3

 Component: rtl-optimization

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

ReportedBy: vhais...@gmail.com





I am wondering if there are not some improvements that could be made in

generation of x86 FPU code. Here is a simple sign function:



float signf4(float x)

{

  return x  0.0f

? -1.0f

: 1.0f;

}



It generates the following assembler code (GCC 4.7.2, g++ -m32 -O3

-fverbose-asm -save-temps -g3 -ggdb -march=native):



_Z6signf4f:

.LFB84:

.loc 1 27 0

.cfi_startproc

.LVL4:

.loc 1 30 0

fld1

fldz

flds4(%esp)# x

fxch%st(1)# ??? Why?

fucomip%st(1), %st#,

ffreep%st(0)#

fld1

fchs

fcmovbe%st(1), %st#,,

fstp%st(1)#

.loc 1 31 0

ret



I am wondering why is the fxch instruction necessary and why is the code

not instead like this?



_Z6signf4f:

.LFB84:

.loc 1 27 0

.cfi_startproc

.LVL4:

.loc 1 30 0

fld1

flds4(%esp)# ??? Load the parameter before the zero.

fldz# ??? to avoid the fxch instruction.

fucomip%st(1), %st#,

[...]


[Bug lto/55902] lto1 SIGSEGV

2013-01-08 Thread vhaisman at gmail dot com

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

--- Comment #4 from Václav Zeman vhaisman at gmail dot com 2013-01-08 
15:00:09 UTC ---
I have fixed the Google doc sharing. It should be accessible now.

I am not sure if I can check GCC 4.7.2, I am using what Ubuntu provides as
package. I believe that MinGW cross compiler suite does not use the gold
linker.

As for the source reduction and flags, I will try those.


[Bug lto/55902] lto1 SIGSEGV

2013-01-08 Thread vhaisman at gmail dot com

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

--- Comment #5 from Václav Zeman vhaisman at gmail dot com 2013-01-08 
18:26:47 UTC ---
(In reply to comment #3)
 Does it only reproduce with -flto-partition=none?
Yes. Changing either the LTO partitioning algorithm or adding -r or -nostdlib
makes the error go away.


[Bug lto/55902] New: lto1 SIGSEGV

2013-01-07 Thread vhaisman at gmail dot com


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



 Bug #: 55902

   Summary: lto1 SIGSEGV

Classification: Unclassified

   Product: gcc

   Version: 4.6.3

Status: UNCONFIRMED

  Severity: normal

  Priority: P3

 Component: lto

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

ReportedBy: vhais...@gmail.com





During compilation of log4cplus using Linux-x-Ming-w64 cross compiler, I am

seeing a SIGSEGV in lto1 executable. The command line to reproduce is the

following:



/usr/lib/gcc/i686-w64-mingw32/4.6/lto1 -march=amdfam10 -mcx16 -msahf -mno-movbe

-mno-aes -mno-pclmul -mpopcnt -mabm -mno-lwp -mno-fma -mno-fma4 -mno-xop

-mno-bmi -mno-tbm -mno-avx -mno-sse4.2 -mno-sse4.1 -mno-rdrnd -mno-f16c

-mno-fsgsbase --param l1-cache-size=64 --param l1-cache-line-size=64 --param

l2-cache-size=512 -mtune=amdfam10 -quiet -dumpdir ./ -dumpbase

appender_test.exe -auxbase-strip /tmp/ccyNkt1q.lto.o -g -g3 -ggdb -O2 -Wall

-Wextra -pedantic -Wstrict-aliasing -Wstrict-overflow -Woverloaded-virtual

-Wc++0x-compat -Wundef -Wshadow -Wformat -Wsuggest-attribute=noreturn

-Wno-variadic-macros -version -fverbose-asm -fvisibility=hidden

-flto-partition=none -fuse-linker-plugin -fresolution=appender_test.res

@./ccxMMj8q -o /tmp/ccyNkt1q.lto.s



Use the attached tarball to get the necessary files.


[Bug lto/55902] lto1 SIGSEGV

2013-01-07 Thread vhaisman at gmail dot com

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

--- Comment #1 from Václav Zeman vhaisman at gmail dot com 2013-01-07 
19:53:51 UTC ---
Attachment upload did not work. The following link should work:
https://docs.google.com/open?id=0B-WkLJEfYmSEVHVmUzR3NDAxTFE


[Bug lto/55902] lto1 SIGSEGV

2013-01-07 Thread vhaisman at gmail dot com

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

--- Comment #2 from Václav Zeman vhaisman at gmail dot com 2013-01-07 
20:19:11 UTC ---
HTH:

amber2::wilx:~/log4cplus-bzr/work-trunk/objdir-mingw64-w32/bug gdb
/usr/lib/gcc/i686-w64-mingw32/4.6/lto1
GNU gdb (GDB) 7.5-ubuntu
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type show copying
and show warranty for details.
This GDB was configured as x86_64-linux-gnu.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /usr/lib/gcc/i686-w64-mingw32/4.6/lto1...(no debugging
symbols found)...done.
(gdb) r -march=amdfam10 -mcx16 -msahf -mno-movbe -mno-aes -mno-pclmul -mpopcnt
-mabm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-tbm -mno-avx
-mno-sse4.2 -mno-sse4.1 -mno-rdrnd -mno-f16c -mno-fsgsbase --param
l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=512
-mtune=amdfam10 -quiet -dumpdir ./ -dumpbase appender_test.exe -auxbase-strip
/tmp/ccyNkt1q.lto.o -g -g3 -ggdb -O2 -Wall -Wextra -pedantic -Wstrict-aliasing
-Wstrict-overflow -Woverloaded-virtual -Wc++0x-compat -Wundef -Wshadow -Wformat
-Wsuggest-attribute=noreturn -Wno-variadic-macros -version -fverbose-asm
-fvisibility=hidden -flto-partition=none -fuse-linker-plugin
-fresolution=appender_test.res @./ccxMMj8q -o /tmp/ccyNkt1q.lto.s
Starting program: /usr/lib/gcc/i686-w64-mingw32/4.6/lto1 -march=amdfam10 -mcx16
-msahf -mno-movbe -mno-aes -mno-pclmul -mpopcnt -mabm -mno-lwp -mno-fma
-mno-fma4 -mno-xop -mno-bmi -mno-tbm -mno-avx -mno-sse4.2 -mno-sse4.1
-mno-rdrnd -mno-f16c -mno-fsgsbase --param l1-cache-size=64 --param
l1-cache-line-size=64 --param l2-cache-size=512 -mtune=amdfam10 -quiet -dumpdir
./ -dumpbase appender_test.exe -auxbase-strip /tmp/ccyNkt1q.lto.o -g -g3 -ggdb
-O2 -Wall -Wextra -pedantic -Wstrict-aliasing -Wstrict-overflow
-Woverloaded-virtual -Wc++0x-compat -Wundef -Wshadow -Wformat
-Wsuggest-attribute=noreturn -Wno-variadic-macros -version -fverbose-asm
-fvisibility=hidden -flto-partition=none -fuse-linker-plugin
-fresolution=appender_test.res @./ccxMMj8q -o /tmp/ccyNkt1q.lto.s
GNU GIMPLE (GCC) version 4.6.3 (i686-w64-mingw32)
compiled by GNU C version 4.6.3 20120624 (prerelease), GMP version 5.0.2,
MPFR version 3.1.0-p3, MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU GIMPLE (GCC) version 4.6.3 (i686-w64-mingw32)
compiled by GNU C version 4.6.3 20120624 (prerelease), GMP version 5.0.2,
MPFR version 3.1.0-p3, MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072

Program received signal SIGSEGV, Segmentation fault.
0x004a68b0 in bitmap_bit_p ()
(gdb) bt
#0  0x004a68b0 in bitmap_bit_p ()
#1  0x0084a6b3 in ?? ()
#2  0x0084587c in ?? ()
#3  0x008459f0 in ?? ()
#4  0x00632e8b in execute_one_pass ()
#5  0x00633145 in execute_pass_list ()
#6  0x0083ca80 in cgraph_process_new_functions ()
#7  0x006330f5 in execute_one_pass ()
#8  0x0063353a in execute_ipa_pass_list ()
#9  0x0083e4b1 in cgraph_optimize ()
#10 0x0049d279 in lto_main ()
#11 0x006c6de9 in toplev_main ()
#12 0x76f4176d in __libc_start_main (main=0x485ea0 main, argc=60,
ubp_av=0x7fffe088, init=optimized out, fini=optimized out,
rtld_fini=optimized out, stack_end=0x7fffe078)
at libc-start.c:226
#13 0x00485f09 in _start ()


[Bug c/53612] New: __attribute__((format(...))) does not work with wchar_t format strings

2012-06-08 Thread vhaisman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53612

 Bug #: 53612
   Summary: __attribute__((format(...))) does not work with
wchar_t format strings
Classification: Unclassified
   Product: gcc
   Version: 4.5.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: vhais...@gmail.com


The __attribute__((format(...))) does not work for wchar_t format strings:

/*-8--*/
#include wchar.h

void foo (char const * fmt, ...) __attribute__ ((format (__printf__, 1, 2)));
void wide_foo (wchar_t const * fmt, ...) __attribute__ ((format (__printf__, 1,
2)));
/*-8--*/

I get the following error with Cygwin's GCC 4.5.3:

./format_attr_text.c:4:1: error: format string argument not a string type


[Bug c++/40942] GCC accepts code that Comeau and MSVC deems invalid.

2012-03-29 Thread vhaisman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40942

Václav Zeman vhaisman at gmail dot com changed:

   What|Removed |Added

Version|4.4.1   |4.7.0

--- Comment #6 from Václav Zeman vhaisman at gmail dot com 2012-03-29 
17:39:40 UTC ---
This still fails for gcc version 4.7.0 20120225.


[Bug tree-optimization/50272] A case that PRE optimization hurts performance

2012-03-29 Thread vhaisman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50272

--- Comment #4 from Václav Zeman vhaisman at gmail dot com 2012-03-29 
17:51:51 UTC ---
This is still a problem in version 4.7.0 20120225.