[Bug c++/71639] [5.2.0] c++11 list initializer and std::transform - error?

2016-06-23 Thread frank67x at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71639

--- Comment #1 from Frank Bergemann  ---
Created attachment 38754
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38754&action=edit
test program main.cpp

[Bug c++/71639] New: [5.2.0] c++11 list initializer and std::transform - error?

2016-06-23 Thread frank67x at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71639

Bug ID: 71639
   Summary: [5.2.0] c++11 list initializer and std::transform -
error?
   Product: gcc
   Version: 5.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: frank67x at gmail dot com
  Target Milestone: ---

i have a strange result, when i apply std::transform with std::back_inserter to
a std::vector, that was initialized with c++11 list initializer.

main.cpp test program will be attached next.
Output for me is:
--
padps08 1249> ./test

using push_back():
==
1, 2, 3, 4, 5, 
1, 2, 3, 4, 5, 2, 4, 6, 8, 10, 

using initializer list:
===
1, 2, 3, 4, 5, 
1, 2, 3, 4, 5, 2, 0, 6, 8, 10, 
--

i compiled this way:

> g++ -o test main.cpp -std=c++11

I have the same problem with 5.4.0.

best regards,
Frank

[Bug c++/71639] [5.2.0] c++11 list initializer and std::transform - error?

2016-06-23 Thread frank67x at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71639

--- Comment #2 from Frank Bergemann  ---
it works on Solaris 5.10

SunOS ### 5.10 Generic_142900-05 sun4u sparc SUNW,Sun-Fire-V890

\Frank

[Bug c++/71639] [5.2.0] c++11 list initializer and std::transform - error?

2016-06-23 Thread frank67x at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71639

--- Comment #3 from Frank Bergemann  ---
But on solaris i only had gcc-4.7.2 yet

\Frank

[Bug c++/71639] [5.2.0] c++11 list initializer and std::transform - error?

2016-06-23 Thread frank67x at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71639

--- Comment #4 from Frank Bergemann  ---
The problem is on Linux

Linux ### 2.6.32-358.55.1.el6.x86_64 #1 SMP Tue Dec 16 06:57:07 EST 2014 x86_64
x86_64 x86_64 GNU/Linux

\Frank

[Bug c++/71639] [5.2.0] c++11 list initializer and std::transform - error?

2016-06-23 Thread frank67x at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71639

--- Comment #5 from Frank Bergemann  ---
I also tested on HP-UX with gcc-4.7.2.

HP-UX ### B.11.31 U ia64 4035416745 unlimited-user license

And it's also ok on HP-UX:

hpux03 506> ./test

using push_back():
==
1, 2, 3, 4, 5, 
1, 2, 3, 4, 5, 2, 4, 6, 8, 10, 

using initializer list:
===
1, 2, 3, 4, 5, 
1, 2, 3, 4, 5, 2, 4, 6, 8, 10,