[Bug c++/57480] New: struct with a va_list considered as non-POD

2013-05-31 Thread roman at tsisyk dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57480

Bug ID: 57480
   Summary: struct with a va_list considered as non-POD
   Product: gcc
   Version: 4.7.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: roman at tsisyk dot com

C++ frontend marks structs with va_list as non-POD.
This problem is probably related to 31488.

roman@work:~$ cat va_list_is_not_pod.cc 
#include 
#include 

struct fiber {
va_list va;
};

int
main(int argc, char *argv[])
{
static_assert(std::is_pod::value, "Should be POD");
}


roman@work:~$ g++ -std=c++11 va_list_is_not_pod.cc -o test
va_list_is_not_pod.cc: In function ‘int main(int, char**)’:
va_list_is_not_pod.cc:11:5: error: static assertion failed: Should be POD

gcc version 4.7.2 (Debian 4.7.2-5)

[Bug c++/57480] struct with a va_list considered as non-POD

2013-05-31 Thread roman at tsisyk dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57480

--- Comment #4 from Roman Tsisyk  ---
I use offsetof on this structure and C++ produces a warning about POD data
type.
std::is_pod is not so important here.
I temporary add -Wno-invalid-offsetof to my code.


[Bug c++/51347] New: [trans-mem] Segfault on templates with -O1 -fgnu-tm

2011-11-29 Thread roman at tsisyk dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51347

 Bug #: 51347
   Summary: [trans-mem] Segfault on templates with -O1 -fgnu-tm
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: ro...@tsisyk.com
 Build: trunk Revision 181801


Created attachment 25946
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25946
Testcase

I am doing some experiments with the transaction memory feature, which has
recently been merged to the main trunk. Currently, one of my tests causes g++
segfault. 
---
main.cpp: In member function 'void BugContainer::bug() [with
ValueType = Info]':
main.cpp:35:1: internal compiler error: Segmentation fault
---

It is always reproducible and tested on various configurations. 
I simplified code and made reduced testcase.

gcc from the trunk rev 181801 date 2029. 
Debian gcc-snapshot 2014 has some problems.

--
Configured with: ../configure --prefix=/usr/lib/gcc-snapshot
--disable-bootstrap --enable-languages=c,c++ --enable-shared
--enable-linker-build-id --with-system-zlib --disable-nls --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin
--with-arch-directory=amd64 --with-arch-32=i586 --with-tune=generic
--disable-werror --enable-checking=yes --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.7.0 2029 (experimental) (GCC) 
--


[Bug c++/51347] [trans-mem] Segfault on templates with -O1 -fgnu-tm

2011-11-29 Thread roman at tsisyk dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51347

--- Comment #1 from Roman Tsisyk  2011-11-29 18:59:31 
UTC ---
Created attachment 25947
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25947
gcc output 2029


[Bug c++/51347] [trans-mem] Segfault on templates with -O1 -fgnu-tm

2011-12-03 Thread roman at tsisyk dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51347

--- Comment #3 from Roman Tsisyk  2011-12-03 10:37:02 
UTC ---
Works for me.
Thanks for the fix.