[Bug c++/56177] [4.8 Regression] ICE when used forward for 'auto f();'

2013-02-05 Thread i.nixman at gmail dot com


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



--- Comment #6 from niXman  2013-02-06 04:16:30 UTC 
---

(In reply to comment #5)

> Fixed.



Thank you.


[Bug c++/56389] Return types differs in block scope function declarations and function implementation

2013-02-19 Thread i.nixman at gmail dot com


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



niXman  changed:



   What|Removed |Added



 CC||i.nixman at gmail dot com



--- Comment #1 from niXman  2013-02-19 09:15:12 UTC 
---

(In reply to comment #0)



> http://liveworkspace.org/code/1zsrDJ$4



Please publish this history item.


[Bug target/55171] [4.7/4.8 Regression] incorrect virtual thunk on mingw

2013-05-06 Thread i.nixman at gmail dot com


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



--- Comment #13 from niXman  2013-05-06 22:31:01 UTC 
---

Kai, any ideas?


[Bug bootstrap/53912] [4.7/4.8 Regression] bootstrap fails using default c++ mode in stage 2 and 3 for native x86_64-w64-mingw32

2012-09-10 Thread i.nixman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53912

--- Comment #19 from niXman  2012-09-10 20:04:16 UTC 
---
(In reply to comment #12)
> Created attachment 27846 [details]
> proposed patch
> 
> This fixes the C and C++ part.

This patch is correct. Why not apply?


[Bug c++/54895] New: the compiler treats '__cdecl' & '__stdcall' as the same.

2012-10-10 Thread i.nixman at gmail dot com


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



 Bug #: 54895

   Summary: the compiler treats '__cdecl' & '__stdcall' as the

same.

Classification: Unclassified

   Product: gcc

   Version: 4.7.0

Status: UNCONFIRMED

  Severity: normal

  Priority: P3

 Component: c++

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

ReportedBy: i.nix...@gmail.com





When I compile this simple code:

void myfoo(void(__cdecl*)()){}

void myfoo(void(__stdcall*)()){}

int main(){}





I get the following error:

Assembler messages:

Error: symbol `__Z5myfooPFvvE' is already defined



Why the compiler treats theese two specificators as the same?





Another example code work as expected:

template

struct is_same {

enum { value = 0 };

};



template

struct is_same {

enum { value = 1 };

};



int main() {

typedef void(__stdcall* stdcall_func_ptr)();

typedef void(__cdecl* cdecl_func_ptr)();



return is_same::value;

}



main returns 0


[Bug c++/54895] the compiler treats '__cdecl' & '__stdcall' as the same.

2012-10-10 Thread i.nixman at gmail dot com


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



--- Comment #1 from niXman  2012-10-10 19:53:48 UTC 
---

used i686-w64-mingw32


[Bug c++/54995] Converting lambda to C-style functions when there is template

2012-10-20 Thread i.nixman at gmail dot com


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



--- Comment #1 from niXman  2012-10-20 07:15:28 UTC 
---



> App crash:

> http://liveworkspace.org/code/3d5e51c9059ea4f37ce2d0d23739d374



More detailed output.



source:

#include 



typedef void(*void_func)();



void foo(void_func f) {

   f();

}



class C {

public:

   template

   void bar(F f) {

  auto func = [f, this] {

 f();

 printf("%d!!!\n", k);

  };



  foo(func);

   }



private:

   int k = 10;

};



int main() {

   printf("%s\n", "ping1");

   auto func = [] {

  printf("called\n");

   };

   printf("%s\n", "ping2");

   C().bar(func);

   printf("%s\n", "ping3");

}





run:

$ g++-4.7.2 -std=c++11 ice.cpp -oice && ./ice

ping1

ping2

called

Segmentation fault (core dumped)


[Bug c++/58080] internal compiler error, decltype in function declaration (for SFINAE purposes)

2013-08-05 Thread i.nixman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58080

--- Comment #12 from niXman  ---
(In reply to Paolo Carlini from comment #9)
> Fixed for 4.9.0.

Can you provide a commit number, please?


[Bug c++/58080] internal compiler error, decltype in function declaration (for SFINAE purposes)

2013-08-05 Thread i.nixman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58080

--- Comment #14 from niXman  ---
(In reply to Paolo Carlini from comment #13)

http://gcc.gnu.org/viewcvs/gcc?view=revision&sortby=date&revision=201512

thank you


[Bug c++/58216] New: ICE: in gen_type_die_with_usage, at dwarf2out.c:19484

2013-08-22 Thread i.nixman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58216

Bug ID: 58216
   Summary: ICE: in gen_type_die_with_usage, at dwarf2out.c:19484
   Product: gcc
   Version: 4.8.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: i.nixman at gmail dot com

When compiled this code with '-g':
template< typename A, typename B >
struct bijection {
auto size() const { return 0; } // error
//auto size() const -> int { return 0; } // ok
};

int main() {
bijection m;
}


I get the error:
$> g++ -std=c++11 -g bimap.cpp -obimap
bimap.cpp:4:14: warning: 'size' function uses 'auto' type specifier without
trailing return type [enabled by default]
  auto size() const { return 0; } // error
  ^
bimap.cpp: In instantiation of 'struct bijection':
bimap.cpp:9:22:   required from here
bimap.cpp:3:8: internal compiler error: in gen_type_die_with_usage, at
dwarf2out.c:19484
 struct bijection {
^
0x705fe1 gen_type_die_with_usage
../../gcc-4.8.1/gcc/dwarf2out.c:19484
0x7086e7 gen_decl_die
../../gcc-4.8.1/gcc/dwarf2out.c:19978
0x707305 gen_member_die
../../gcc-4.8.1/gcc/dwarf2out.c:19045
0x707305 gen_struct_or_union_type_die
../../gcc-4.8.1/gcc/dwarf2out.c:19117
0x707305 gen_tagged_type_die
../../gcc-4.8.1/gcc/dwarf2out.c:19307
0x707305 gen_tagged_type_die
../../gcc-4.8.1/gcc/dwarf2out.c:19250
0x706148 gen_type_die_with_usage
../../gcc-4.8.1/gcc/dwarf2out.c:19454
0x708307 gen_decl_die
../../gcc-4.8.1/gcc/dwarf2out.c:20017
0x85947b rest_of_type_compilation(tree_node*, int)
../../gcc-4.8.1/gcc/passes.c:215
0x57af7d finish_struct_1(tree_node*)
../../gcc-4.8.1/gcc/cp/class.c:6401
0x56ae90 instantiate_class_template_1
../../gcc-4.8.1/gcc/cp/pt.c:9043
0x56ae90 instantiate_class_template(tree_node*)
../../gcc-4.8.1/gcc/cp/pt.c:9083
0x5b995d complete_type(tree_node*)
../../gcc-4.8.1/gcc/cp/typeck.c:131
0x538799 start_decl_1(tree_node*, bool)
../../gcc-4.8.1/gcc/cp/decl.c:4667
0x546c0f start_decl(cp_declarator const*, cp_decl_specifier_seq*, int,
tree_node*, tree_node*, tree_node**)
../../gcc-4.8.1/gcc/cp/decl.c:4630
0x5ab9ac cp_parser_init_declarator
../../gcc-4.8.1/gcc/cp/parser.c:16018
0x5ac2da cp_parser_simple_declaration
../../gcc-4.8.1/gcc/cp/parser.c:10670
0x5b0f47 cp_parser_block_declaration
../../gcc-4.8.1/gcc/cp/parser.c:10551
0x5b0f47 cp_parser_block_declaration
../../gcc-4.8.1/gcc/cp/parser.c:10477
0x5b1fa0 cp_parser_declaration_statement
../../gcc-4.8.1/gcc/cp/parser.c:10195
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

GCC used:
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-linux-gnu/4.8.1/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../gcc-4.8.1/configure --enable-languages=c,c++
--enable-shared --enable-static --without-included-gettext
--enable-threads=posix --disable-nls --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object
--enable-plugin --with-system-zlib --with-cloog --enable-cloog-backend=ppl
--disable-cloog-version-check --disable-ppl-version-check --enable-multiarch
--disable-werror --with-api=m64 --with-tune=generic --enable-checking=release
--build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
--disable-bootstrap
Thread model: posix
gcc version 4.8.1 (GCC)


Perhaps this bug is the same as:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53756


[Bug lto/50616] New: lto1.exe: internal compiler error: invalid resolution in the resolution file

2011-10-04 Thread i.nixman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50616

 Bug #: 50616
   Summary: lto1.exe: internal compiler error: invalid resolution
in the resolution file
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: lto
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: i.nix...@gmail.com


I compile the files attached with this command-line: "g++ ltotest.cpp int.cpp
-oltotest -s -O3 -flto"
and get the following error: "lto1.exe: internal compiler error: invalid
resolution in the resolution file"

configured with:
g++ -v Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/i686-pc-mingw32/4.7.0/lto-wrapper.exe
Target: i686-pc-mingw32
Configured with: ../../mingw-src/gcc-4.7-20111001/configure \
--host=i686-pc-mingw32 \
--build=i686-pc-mingw32 \
--target=i686-pc-mingw32 \
--prefix=/mingw-sjlj-x86 \
--with-arch=i686 \
--with-tune=generic \
--enable-languages=c,c++,lto,objc,obj-c++,fortran \
--with-host-libstdcxx=-lstdc++ \
--disable-shared \
--enable-static \
--enable-cxx-flags='-fno-function-sections -fno-data-sections' \
--enable-libstdcxx-time=yes \
--enable-libgomp \
--enable-lto \
--enable-graphite \
--enable-cloog-backend=isl \
--enable-checking=release \
--enable-fully-dynamic-string \
--enable-threads=posix \
--disable-libstdcxx-pch \
--enable-libstdcxx-debug \
--enable-sjlj-exceptions \
--disable-debug \
--disable-bootstrap \
--disable-multilib \
--disable-rpath \
--disable-win32-registry \
--disable-nls \
--disable-werror \
--disable-symvers \
--with-gmp=/mingw-libs \
--with-mpfr=/mingw-libs \
--with-mpc=/mingw-libs \
--with-ppl=/mingw-libs \
--with-cloog=/mingw-libs \
--with-libiconv-prefix=/mingw-libs \
Thread model: posix
gcc version 4.7.0 20111001 (experimental)


[Bug lto/50616] lto1.exe: internal compiler error: invalid resolution in the resolution file

2011-10-04 Thread i.nixman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50616

--- Comment #1 from niXman  2011-10-04 18:35:30 UTC 
---
Created attachment 25416
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25416
LTO test sources


[Bug lto/50616] lto1.exe: internal compiler error: invalid resolution in the resolution file

2011-10-04 Thread i.nixman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50616

niXman  changed:

   What|Removed |Added

   Severity|normal  |critical


[Bug c++/50736] New: ISO_IEC_14882-2011-5.1.2/10 - bug

2011-10-15 Thread i.nixman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50736

 Bug #: 50736
   Summary: ISO_IEC_14882-2011-5.1.2/10 - bug
Classification: Unclassified
   Product: gcc
   Version: 4.6.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: i.nix...@gmail.com


Quote from ISO_IEC_14882-2011, 5.1.2/10:
> The identifiers in a capture-list are looked up using 
> the usual rules for unqualified name lookup (3.4.1); each
> such lookup shall find a variable with automatic 
> storage duration declared in the reaching scope of the local
> lambda expression. An entity (i.e. a variable or this) is 
> said to be explicitly captured if it appears in the
> lambda-expression’s capture-list.

But this code successfuly compiled on gcc-4.6.1:
#include 
int main() {
  using std::cout;
  auto f = [&cout]() { cout << 1; }; // <<
  f();
}

http://liveworkspace.org/code/ae698b7daf7b5b531beafd9faaa6a409


Intel C++ 12.1 says: error : a variable with static storage
duration cannot be captured in a lambda


niXman.


[Bug target/49910] "internal compiler error: in redirect_jump, at jump.c:1485" when build ppl-0.11.2

2011-10-15 Thread i.nixman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49910

niXman  changed:

   What|Removed |Added

   Severity|normal  |critical


[Bug c++/53211] New: range-based 'for' expression of type 'const int []' has incomplete type

2012-05-03 Thread i.nixman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53211

 Bug #: 53211
   Summary: range-based 'for' expression of type 'const int []'
has incomplete type
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: i.nix...@gmail.com


This code compiles successfully:
#include 

template
void func(Args... ) {
   const int arr[] = {1,2,3,4}; // !
   for (auto it: arr) {
  std::cout << it << std::endl;
   }
}

int main() {
   func(1,2,3,4);
}

http://liveworkspace.org/code/d7f2c44576fbf6854d113e29f976faa4

But if I change the initialization way of 'arr' like this, I get the following
error:
#include 

template
void func(Args... args) {
   const int arr[] = {args...}; // !
   for (auto it: arr) {
  std::cout << it << std::endl;
   }
}

int main() {
   func(1,2,3,4);
}

http://liveworkspace.org/code/722f90c75ea3aa56310c24fd2abeea50

> source.cpp: In function 'void func(Args ...)':
> source.cpp:6:18: error: range-based 'for' expression of type 'const int []' 
> has incomplete type


[Bug c++/53211] range-based 'for' expression of type 'const int []' has incomplete type

2012-05-03 Thread i.nixman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53211

--- Comment #2 from niXman  2012-05-03 16:04:26 UTC 
---
This code also works:

#include 

template
void func(Args... args) {
   const int arr[] = {args...};
   for (int it: arr) { // !
  std::cout << it << std::endl;
   }
}

int main() {
   func(1,2,3,4);
}


I'm confused...


[Bug libstdc++/52300] New: Gthreads functions linking error at dynamic linking with libstdc++ when using MinGW.

2012-02-17 Thread i.nixman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52300

 Bug #: 52300
   Summary: Gthreads functions linking error at dynamic linking
with libstdc++ when using MinGW.
Classification: Unclassified
   Product: gcc
   Version: 4.6.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: i.nix...@gmail.com


When using std::threads for example, the program is compiled correctly. But
when running I get segfolts. If the program is linked with -static - all the
problem disappears.

If in the file gthr-posix.h I change this line:
> # If SUPPORTS_WEAK && GTHREAD_USE_WEAK
on this:
> # If SUPPORTS_WEAK && GTHREAD_USE_WEAK && !defined(__MINGW32__)
- the problem is solved.

Is there any way to fix this?

niXman.


[Bug lto/50616] lto1.exe: internal compiler error: invalid resolution in the resolution file

2012-02-19 Thread i.nixman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50616

--- Comment #9 from niXman  2012-02-19 16:22:52 UTC 
---
lto-plugin/lto-plugin.c

http://gcc.gnu.org/viewcvs/trunk/lto-plugin/lto-plugin.c?view=markup
line 363.


[Bug libstdc++/52300] Gthreads functions linking error at dynamic linking with libstdc++ when using MinGW.

2012-02-19 Thread i.nixman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52300

--- Comment #2 from niXman  2012-02-19 17:14:03 UTC 
---
Thanks Kai!


[Bug c/52368] New: internal compiler error: in convert_move, at expr.c:326

2012-02-23 Thread i.nixman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52368

 Bug #: 52368
   Summary: internal compiler error: in convert_move, at
expr.c:326
Classification: Unclassified
   Product: gcc
   Version: 4.6.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: i.nix...@gmail.com


When building gcc-4_6-branch using MinGW - gcc-4.6.2-release with LTO enabled I
get the following error:

i686-pc-mingw32-gcc   -O3 -flto -pipe -fomit-frame-pointer
-momit-leaf-frame-pointer -I/mingw-libs/include -DIN_GCC   -W -Wall
-Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings -Wold-style-definition -Wc++-compat   -DHAVE_CONFIG_H
-Wl,--stack,12582912 -o cc1.exe c-lang.o c-family/stub-objc.o attribs.o
c-errors.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-objc-common.o
c-parser.o tree-mudflap.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 i386-c.o msformat-c.o \
  cc1-checksum.o main.o  libbackend.a ../libcpp/libcpp.a
../libdecnumber/libdecnumber.a ../libcpp/libcpp.a  /mingw-libs/lib/libiconv.a
-L/mingw-libs/lib ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a
-lstdc++ -L/mingw-libs/lib -lcloog-isl -lisl -L/mingw-libs/lib -lppl_c -lppl 
-lgmpxx -L/mingw-libs/lib -L/mingw-libs/lib -L/mingw-libs/lib -lmpc -lmpfr
-lgmp  -lstdc++ -L../zlib -lz
In file included from :275:0:
../../../mingw-src/gcc-4_6-branch/gcc/ipa-cp.c: In function
'ipcp_process_devirtualization_opportunities.isra.22':
../../../mingw-src/gcc-4_6-branch/gcc/tree.c:6336:7: warning: 'delta' may be
used uninitialized in this function [-Wuninitialized]
../../../mingw-src/gcc-4_6-branch/gcc/ipa-cp.c:1227:20: note: 'delta' was
declared here
In file included from ../../../mingw-src/gcc-4_6-branch/gcc/c-decl.c:6019:0,
 from ../../../mingw-src/gcc-4_6-branch/gcc/c-decl.c:487,
 from :3817:
../../../mingw-src/gcc-4_6-branch/libcpp/lex.c: In function 'search_line_sse2':
../../../mingw-src/gcc-4_6-branch/libcpp/lex.c:370:15: internal compiler error:
in convert_move, at expr.c:326


[Bug libitm/52787] New: Segmentation fault on MinGW

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

 Bug #: 52787
   Summary: Segmentation fault on MinGW
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libitm
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: i.nix...@gmail.com


This code successfully compiled but on run crashes:

// { dg-do run }

extern "C" void abort ();

int dothrow;
int g;

static void f1()
{
  g++;
  if (dothrow)
throw 1;
}

static void f2()
{
  __transaction_atomic {
f1();
  }
}

int main()
{
  dothrow = 0;
  f2();

  dothrow = 1;
  try {
f2();
  } catch (...) {
  }

  if (g != 2)
abort ();
  return 0;
}

-

Coompiler:
$ g++ -v

Using built-in specs.
COLLECT_GCC=e:\mingw32\bin\g++.exe
COLLECT_LTO_WRAPPER=e:/mingw32/bin/../libexec/gcc/i686-w64-mingw32/4.7.0/lto-wrapper.exe
Target: i686-w64-mingw32
Configured with: ../../mingw-src/gcc-4.7.0/configure --host=i686-w64-mingw32
--build=i686-w64-mingw32 --target=i686-w64-mingw32 --enable-targets=all
--enable-multilib --prefix=/./mingw-x32 --with-sysroot=/./mingw-x32
--with-tune=generic --enable-languages=c,c++,lto,fortran
--enable-libstdcxx-time=yes --with-host-libstdcxx='-static -lstdc++'
--enable-shared --enable-static --enable-threads=posix --enable-libgomp
--enable-lto --enable-graphite --enable-cloog-backend=isl
--enable-checking=release --enable-fully-dynamic-string
--enable-version-specific-runtime-libs --enable-sjlj-exceptions
--disable-libstdcxx-pch --disable-libstdcxx-debug --disable-debug
--disable-bootstrap --disable-rpath --disable-win32-registry --disable-nls
--disable-werror --disable-symvers --with-libiconv --with-gmp=/./mingw-libs-x32
--with-mpfr=/./mingw-libs-x32 --with-mpc=/./mingw-libs-x32
--with-ppl=/./mingw-libs-x32 --with-cloog=/./mingw-libs-x32 CFLAGS='-O3 -pipe
-fomit-frame-pointer -momit-leaf-frame-pointer -I/./mingw-libs-x32/include'
CXXFLAGS='-O3 -pipe -fomit-frame-pointer -momit-leaf-frame-pointer' CPPFLAGS=
LDFLAGS='-pipe -s -L/./mingw-libs-x32/lib'
Thread model: posix
gcc version 4.7.0

-

Output log from gdb:

Program received signal SIGSEGV, Segmentation fault.
(anonymous namespace)::serialirr_dispatch::ITM_RU4 (this=0x81c0d8, ptr=0x1)
at E:/msys/mingw-src/gcc-4.7.0/libitm/method-serial.cc:90
90  CREATE_DISPATCH_METHODS(virtual, )


-


[Bug libitm/52787] Segmentation fault on MinGW

2012-03-30 Thread i.nixman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52787

--- Comment #2 from niXman  2012-03-30 19:55:51 UTC 
---
>Based to your e-mail on gcc-help, you left out a very important piece of
information.
Yes, Ian. I had to mention it.
And yes, I'm not saying that libitm is supported by MinGW. And yes, as libitm
is not supported by MinGW - it's not a bug. I hurried with the creation of the
bug report.

I'd really like to make libitm work with MinGW. I would like to understand why
SIGSEGV occurs...

Thanks.


[Bug c++/53139] New: internal compiler error: expected a type, got '#'tree_vec' not supported by dump_expr#'

2012-04-27 Thread i.nixman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53139

 Bug #: 53139
   Summary: internal compiler error: expected a type, got
'#'tree_vec' not supported by dump_expr#'
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: i.nix...@gmail.com


This code:

// Compile: g++ -std=c++11 test.cpp
// Compile: clang++ -std=c++11 test.cpp

//#include 
//#include 

namespace my_types
{

struct nil {};

//original type
template 
struct chain
{
   typedef T first_type;
   typedef U second_type;
};

}

template  class Chain, typename Nil>
struct chain_generator
{
   template 
   struct gen
   {
   private:
  template 
  struct inner
  {
 typedef Chain::type > type;
  };

  template 
  struct inner<0, Dummy>
  {
 typedef Chain type;
  };
   public:
  typedef typename inner::type type;
   };
};

int main( /* int argc, char* argv[] */ )
{
   using my_types::chain;
   using my_types::nil;

   typedef chain>> t0;
   typedef chain_generator my_gen;
   typedef my_gen::gen::type t1;

   return 0;
}


when compiling with gcc-4.7.0 produce this errors:
> source.cpp:29:22: error: 'size_t' has not been declared
> source.cpp: In instantiation of 'struct chain_generator my_types::nil>::gen::inner<2, void>':
> source.cpp:41:53:   required from 'struct chain_generator my_types::nil>::gen'
> source.cpp:52:41:   required from here
> source.cpp:32:57: error: type/value mismatch at argument 1 in template 
> parameter list for 'template class Chain, class Nil> 
> template struct chain_generator::gen'
> source.cpp:32:57: error:   expected a type, got '#'tree_vec' not supported by 
> dump_expr#'
> source.cpp:32:57: error: type/value mismatch at argument 2 in template 
> parameter list for 'template class Chain, class Nil> 
> template struct chain_generator::gen'
> source.cpp:32:57: error:   expected a type, got '#'tree_vec' not supported by 
> dump_expr#'

when compiling with gcc-4.6.3 produce this errors:
> source.cpp:30:13: error: 'size_t' has not been declared
> source.cpp:33:41: sorry, unimplemented: cannot expand 'Args ...' into a 
> fixed-length argument list
> source.cpp:33:49: error: template argument 2 is invalid
> source.cpp:33:51: error: expected '::' before 'type'

with clang this code compiled successfully.

gcc-4.7.0 test-drive:
http://liveworkspace.org/code/6287f6a38362af545712f43a56851a0b


[Bug c++/53139] internal compiler error: expected a type, got '#'tree_vec' not supported by dump_expr#'

2012-04-27 Thread i.nixman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53139

--- Comment #3 from niXman  2012-04-27 11:08:17 UTC 
---
with 4.7-branch rev-186846 and trunk rev-186841 - everything is ok.


[Bug c++/51265] New: internal compiler error: in finish_decltype_type, at cp/semantics.c:5244

2011-11-21 Thread i.nixman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51265

 Bug #: 51265
   Summary: internal compiler error: in finish_decltype_type, at
cp/semantics.c:5244
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: i.nix...@gmail.com


When I try to compile following code, I get error:
test1.cpp: In instantiation of 'void xx(T*, A ...) [with X = int
(Funny::*)(int) const; X ff = &Funny::print3; R = int; T = Funny; A = {int}]':
test1.cpp:35:74:   required from here
test1.cpp:23:9: internal compiler error: in finish_decltype_type, at
cp/semantics.c:5244

code:


#include 

struct Funny {
void print(int i) {
std::cout << "void (Funny::*)(int): " << i << std::endl;
}
int print2(int i) {
std::cout << "int (Funny::*)(int): " << i << std::endl;
return i;
}
int print3(int i)  const {
std::cout << "int (Funny::*)(int) const: " << i << std::endl;
return i;
}
};
template
void c(){ T abc; (abc.*ff)(123); }
template
void xx(T* _obj, A... args){
for (int i : {2,4}) std::cout << i << std::endl; // #3 int i is OK
{
/* 23 */ c(); // #1 summary error trigger here
}

std::cout << "xx()" << std::endl;
(_obj->*(ff))(args...);
// #2 can not define any object here, even int
// T abc; 
//(abc.*ff)(args...);
}
int main()
{
Funny abc;
/* 35 */ xx(&abc,
3);
return 0;
}


configured with:
C:\test>g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/i686-pc-mingw32/4.7.0/lto-wrappe
r.exe
Target: i686-pc-mingw32
Configured with: ../../mingw-src/gcc-trunk/configure --host=i686-pc-mingw32
--bu
ild=i686-pc-mingw32 --target=i686-pc-mingw32 --prefix=/mingw-sjlj-x86
--with-arc
h=i686 --with-tune=generic --enable-languages=c,c++,lto,fortran,objc,obj-c++
--w
ith-host-libstdcxx=-lstdc++ --disable-shared --enable-static
--enable-cxx-flags=
'-fno-function-sections -fno-data-sections' --enable-libstdcxx-time=yes
--enable
-libgomp --enable-lto --enable-graphite --enable-cloog-backend=isl
--enable-chec
king=release --enable-fully-dynamic-string --enable-threads=posix
--disable-libs
tdcxx-pch --enable-libstdcxx-debug --enable-sjlj-exceptions --disable-debug
--di
sable-bootstrap --disable-multilib --disable-rpath --disable-win32-registry
--di
sable-nls --disable-werror --disable-symvers --with-gmp=/mingw-libs
--with-mpfr=
/mingw-libs --with-mpc=/mingw-libs --with-ppl=/mingw-libs
--with-cloog=/mingw-li
bs --with-libiconv-prefix=/mingw-libs --with-pkgversion='niXman build'
Thread model: posix


[Bug target/50616] lto1.exe: internal compiler error: invalid resolution in the resolution file

2012-01-03 Thread i.nixman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50616

--- Comment #3 from niXman  2012-01-03 09:53:59 UTC 
---
Created attachment 26229
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26229
sources + temp files + logs


[Bug target/50616] lto1.exe: internal compiler error: invalid resolution in the resolution file

2012-01-08 Thread i.nixman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50616

--- Comment #5 from niXman  2012-01-08 15:15:19 UTC 
---
I don't have other GCC versions or lto-pugins on my computer.

Here is a fragment of code from gcc-4.6.2-release:
  fprintf (f, "%u %x %s %s\n", (unsigned int) slot, symtab->aux[j].id,
   lto_resolution_str[resolution], 
   symtab->syms[j].name);

This one is the same fragment from gcc-4.6.3-branch:
  fprintf (f, "%u %x %s %s\n", (unsigned int) slot, symtab->aux[j].id,
   lto_resolution_str[resolution], 
   symtab->syms[j].name);

And this one is the same fragment from gcc-trunk:
  fprintf (f, "%u %llx %s %s\n",
   (unsigned int) slot, symtab->aux[j].id,
   lto_resolution_str[resolution], 
   symtab->syms[j].name);


[Bug target/50616] lto1.exe: internal compiler error: invalid resolution in the resolution file

2012-01-15 Thread i.nixman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50616

--- Comment #6 from niXman  2012-01-16 01:43:56 UTC 
---
Replacing "%llx" to "%I64x" solves the problem.

http://msdn.microsoft.com/en-us/library/3b2e7499(v=vs.80).aspx

Thanks, niXman.


[Bug c++/51979] New: variadic templates + lambda capture list = error

2012-01-24 Thread i.nixman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51979

 Bug #: 51979
   Summary: variadic templates + lambda capture list = error
Classification: Unclassified
   Product: gcc
   Version: 4.6.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: i.nix...@gmail.com


The following code:
template  void foo(Args... args) {}
template  void bar(Args... args) {
   auto lambda = [=, args...]() {
  foo(args...);
   };
}

produce this error:
>g++ -std=c++0x lambd.cpp -olambd
lambd.cpp: In function 'void bar(Args ...)':
lambd.cpp:3:25: error: expected ',' before '...' token
lambd.cpp:3:25: error: expected identifier before '...' token
lambd.cpp:3:28: error: parameter packs not expanded with '...':
lambd.cpp:3:28: note: 'args'
lambd.cpp: In lambda function:
lambd.cpp:4:13: error: expansion pattern '((const bar(Args
...)::*)this)->bar(Args ...)args' contains no argument
packs

example from c++ draft 5.1.2.23:
template
void f(Args... args) {
   auto lm = [&, args...] { return g(args...); };
   lm();
}


[Bug libquadmath/55225] Fail to build lgammaq.c from trunk with mingw-w64

2012-11-21 Thread i.nixman at gmail dot com


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



--- Comment #2 from niXman  2012-11-21 08:09:40 UTC 
---

(In reply to comment #1)

> Fixed in mingw-w64 trunk



Strange that the mingw-w64 developers didn't report that the bug is fixed.


[Bug target/54895] the compiler treats '__cdecl' & '__stdcall' as the same.

2012-11-22 Thread i.nixman at gmail dot com


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



--- Comment #5 from niXman  2012-11-22 18:37:55 UTC 
---

(In reply to comment #4)

> This is most likely a duplicate of already fixed PR/55268.



I checked upon the 193725 revision.

The first test gives the same result. The second test now gives the wrong

result(1). Before this the result of the second test was right.


[Bug libstdc++/52015] std::to_string does not work under MinGW

2013-01-05 Thread i.nixman at gmail dot com


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



--- Comment #19 from niXman  2013-01-05 21:24:03 UTC 
---

Why not apply to gcc-4_7-branch?


[Bug c++/56177] New: ICE when used forward for 'auto f();'

2013-02-01 Thread i.nixman at gmail dot com


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



 Bug #: 56177

   Summary: ICE when used forward for 'auto f();'

Classification: Unclassified

   Product: gcc

   Version: 4.8.0

Status: UNCONFIRMED

  Severity: normal

  Priority: P3

 Component: c++

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

ReportedBy: i.nix...@gmail.com





Working code:

#include 

//auto f();

auto f() { return 33; }

int main() {

   std::cout << f() << std::endl;

}



Problematic code:

#include 

auto f();

auto f() { return 33; }

int main() {

   std::cout << f() << std::endl;

}



Compiler output:

source.cpp: In function 'auto f()':

source.cpp:4:19: internal compiler error: in check_return_expr, at

cp/typeck.c:8159

auto f() { return 33; }

^

0x5858ac check_return_expr(tree_node*, bool*)

../../gcc-4.8-20130127/gcc/cp/typeck.c:8159

0x5a31ae finish_return_stmt(tree_node*)

../../gcc-4.8-20130127/gcc/cp/semantics.c:782

0x55a0d1 cp_parser_jump_statement

../../gcc-4.8-20130127/gcc/cp/parser.c:10041

0x55a0d1 cp_parser_statement

../../gcc-4.8-20130127/gcc/cp/parser.c:8769

0x55a9e6 cp_parser_statement_seq_opt

../../gcc-4.8-20130127/gcc/cp/parser.c:9133

0x55aab6 cp_parser_compound_statement

../../gcc-4.8-20130127/gcc/cp/parser.c:9087

0x56e686 cp_parser_function_body

../../gcc-4.8-20130127/gcc/cp/parser.c:17672

0x56e686 cp_parser_ctor_initializer_opt_and_function_body

../../gcc-4.8-20130127/gcc/cp/parser.c:17708

0x56f6c9 cp_parser_function_definition_after_declarator

../../gcc-4.8-20130127/gcc/cp/parser.c:21680

0x5700f1 cp_parser_function_definition_from_specifiers_and_declarator

../../gcc-4.8-20130127/gcc/cp/parser.c:21601

0x5700f1 cp_parser_init_declarator

../../gcc-4.8-20130127/gcc/cp/parser.c:15810

0x57045a cp_parser_simple_declaration

../../gcc-4.8-20130127/gcc/cp/parser.c:10561

0x5750b7 cp_parser_block_declaration

../../gcc-4.8-20130127/gcc/cp/parser.c:10442

0x5750b7 cp_parser_block_declaration

../../gcc-4.8-20130127/gcc/cp/parser.c:10368

0x57a11b cp_parser_declaration

../../gcc-4.8-20130127/gcc/cp/parser.c:10339

0x578da7 cp_parser_declaration_seq_opt

../../gcc-4.8-20130127/gcc/cp/parser.c:10225

0x57a652 cp_parser_translation_unit

../../gcc-4.8-20130127/gcc/cp/parser.c:3807

0x57a652 c_parse_file()

../../gcc-4.8-20130127/gcc/cp/parser.c:28175

0x612894 c_common_parse_file()

../../gcc-4.8-20130127/gcc/c-family/c-opts.c:1036

Please submit a full bug report,

with preprocessed source if appropriate.

Please include the complete backtrace with any bug report.

See  for instructions.





Online test: http://liveworkspace.org/code/3bTktL$0


[Bug c++/49910] New: "internal compiler error: in redirect_jump, at jump.c:1485" when build ppl-0.11.2

2011-07-29 Thread i.nixman at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49910

   Summary: "internal compiler error: in redirect_jump, at
jump.c:1485" when build ppl-0.11.2
   Product: gcc
   Version: 4.6.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: i.nix...@gmail.com


Created attachment 24868
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24868
temporaries files and log