[Bug middle-end/63244] [4.9 regression] internal compiler error: Segmentation fault (program cc1plus)

2014-10-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63244

Jakub Jelinek  changed:

   What|Removed |Added

   Target Milestone|4.9.2   |4.9.3

--- Comment #13 from Jakub Jelinek  ---
GCC 4.9.2 has been released.


[Bug middle-end/63244] [4.9 regression] internal compiler error: Segmentation fault (program cc1plus)

2014-10-11 Thread nheghathivhistha at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63244

--- Comment #12 from David Kredba  ---
The same affects games-simulation/flightgear-3.0.0-r1:
/var/tmp/portage/games-simulation/flightgear-3.0.0-r1/work/flightgear-3.0.0/src/Environment/environment.cxx:
In member function '_recalc_alt_pt':
/var/tmp/portage/games-simulation/flightgear-3.0.0-r1/work/flightgear-3.0.0/src/Environment/environment.cxx:741:1:
internal compiler error: Segmentation fault
 FGEnvironment::_recalc_alt_pt ()
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
with gcc-4_9-branch revision 216116.

When -g is removed, problem is gone.


[Bug middle-end/63244] [4.9 regression] internal compiler error: Segmentation fault (program cc1plus)

2014-09-19 Thread ccoutant at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63244

Cary Coutant  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |ccoutant at gcc dot 
gnu.org


[Bug middle-end/63244] [4.9 regression] internal compiler error: Segmentation fault (program cc1plus)

2014-09-19 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63244

--- Comment #11 from Markus Trippelsdorf  ---
(In reply to Markus Trippelsdorf from comment #10)
> The testcase from comment 4 started segfaulting with r202298.

I've opened PR63306 for this issue.


[Bug middle-end/63244] [4.9 regression] internal compiler error: Segmentation fault (program cc1plus)

2014-09-15 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63244

Markus Trippelsdorf  changed:

   What|Removed |Added

 CC||hubicka at gcc dot gnu.org

--- Comment #10 from Markus Trippelsdorf  ---
The testcase from comment 4 started segfaulting with r202298.


[Bug middle-end/63244] [4.9 regression] internal compiler error: Segmentation fault (program cc1plus)

2014-09-15 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63244

Markus Trippelsdorf  changed:

   What|Removed |Added

 CC||ccoutant at gcc dot gnu.org

--- Comment #9 from Markus Trippelsdorf  ---
Original issue started with r205292.
(issues from comment 4 & 5 are older (haven't bisceted yet))


[Bug middle-end/63244] [4.9 regression] internal compiler error: Segmentation fault (program cc1plus)

2014-09-13 Thread nheghathivhistha at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63244

--- Comment #8 from David Kredba  ---
I tried gdb and follow-fork-mode child and bt is repeating below for me.

-cut-
#101591 0x00e99a17 in d_print_comp (dpi=dpi@entry=0x7fff9200,
options=options@entry=0, dc=)
at
/var/tmp/portage/sys-devel/gcc-4.9.2_alpha20140911/work/gcc-4.9-20140911/libiberty/cp-demangle.c:4517
#101592 0x00e9c618 in d_print_cast (dpi=dpi@entry=0x7fff9200,
options=options@entry=0, dc=0x7fff9d90)
at
/var/tmp/portage/sys-devel/gcc-4.9.2_alpha20140911/work/gcc-4.9-20140911/libiberty/cp-demangle.c:5700
#101593 0x00e9a623 in d_print_comp (dpi=dpi@entry=0x7fff9200,
options=options@entry=0, dc=dc@entry=0x7fff9d90)
at
/var/tmp/portage/sys-devel/gcc-4.9.2_alpha20140911/work/gcc-4.9-20140911/libiberty/cp-demangle.c:4967
#101594 0x00e9a278 in d_print_comp (dpi=dpi@entry=0x7fff9200,
options=options@entry=0, dc=)
at
/var/tmp/portage/sys-devel/gcc-4.9.2_alpha20140911/work/gcc-4.9-20140911/libiberty/cp-demangle.c:4326
-cut-


[Bug middle-end/63244] [4.9 regression] internal compiler error: Segmentation fault (program cc1plus)

2014-09-12 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63244

--- Comment #7 from Markus Trippelsdorf  ---
When one uses a naive test script one arrives at the testcase
from comment 4. Using a differential script (-O2 vs. -flto -O2 -g)
one gets:

markus@x4 /tmp % cat context2.ii
namespace std {
template 
_Tp declval();
}
class A {};
namespace std {
template 
using __allocator_base = A;
template 
class H : __allocator_base {};
template >
class I {};
}

template 
class D;
struct F;
namespace detail {
template 
class iterator_adaptor;
template 
class basic_range {
 public:
  template 
  using store_traits = int;
  template 
  operator V() const {}
};
template 
using preferred_iterator_type = decltype(std::declval);
}

template 
class adaptor_range
: public detail::basic_range<
  adaptor_range,
  detail::iterator_adaptor...>,
  detail::iterator_adaptor<
  F, detail::preferred_iterator_type...>> {};
class J : public adaptor_range> {};
template 
using property_list = int;
class G {
  G(const property_list &props, const J &);
  std::I> devs;
};
G::G(const property_list &props, const J &devs) : devs(devs) {}

markus@x4 /tmp % g++ -std=c++11 -flto -O2 -g -c context2.ii
g++: internal compiler error: Segmentation fault (program cc1plus)
0x40c96c execute
../../gcc/gcc/gcc.c:2855
0x40cd34 do_spec_1
../../gcc/gcc/gcc.c:4659
0x40f5f6 process_brace_body
../../gcc/gcc/gcc.c:5942
0x40f5f6 handle_braces
../../gcc/gcc/gcc.c:5856
0x40dba9 do_spec_1
../../gcc/gcc/gcc.c:5313
0x40f5f6 process_brace_body
../../gcc/gcc/gcc.c:5942
0x40f5f6 handle_braces
../../gcc/gcc/gcc.c:5856
0x40dba9 do_spec_1
../../gcc/gcc/gcc.c:5313
0x40d913 do_spec_1
../../gcc/gcc/gcc.c:5428
0x40f5f6 process_brace_body
../../gcc/gcc/gcc.c:5942
0x40f5f6 handle_braces
../../gcc/gcc/gcc.c:5856
0x40dba9 do_spec_1
../../gcc/gcc/gcc.c:5313
0x40f5f6 process_brace_body
../../gcc/gcc/gcc.c:5942
0x40f5f6 handle_braces
../../gcc/gcc/gcc.c:5856
0x40dba9 do_spec_1
../../gcc/gcc/gcc.c:5313
0x40f5f6 process_brace_body
../../gcc/gcc/gcc.c:5942
0x40f5f6 handle_braces
../../gcc/gcc/gcc.c:5856
0x40dba9 do_spec_1
../../gcc/gcc/gcc.c:5313
0x40f5f6 process_brace_body
../../gcc/gcc/gcc.c:5942
0x40f5f6 handle_braces
../../gcc/gcc/gcc.c:5856
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

Looks like a stack overflow.

(-g and -flto alone are fine)
markus@x4 /tmp % g++ -std=c++11 -O2 -g -c context2.ii
markus@x4 /tmp % g++ -std=c++11 -flto -O2 -c context2.ii
markus@x4 /tmp %


[Bug middle-end/63244] [4.9 regression] internal compiler error: Segmentation fault (program cc1plus)

2014-09-12 Thread nheghathivhistha at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63244

--- Comment #6 from David Kredba  ---
For the record only, git version of c-reduce returned

namespace std {
template  struct less;
template  struct add_rvalue_reference;
template  typename add_rvalue_reference<_Tp>::type declval();
template  struct __add_rvalue_reference_helper {
  typedef _Tp type;
};
template 
struct add_rvalue_reference : __add_rvalue_reference_helper<_Tp> {};
}
typedef int intptr_t;
namespace std {
template  class allocator;
template  > class vector {};
}

typedef intptr_t cl_context_properties;
namespace clover {
class device;
}
namespace std {
template  > class map;
}
namespace clover {
template  class intrusive_ref;
struct derefs;
namespace detail {
template  class iterator_adaptor;
template  class basic_range {
public:
  template  operator V() const {}
};
template  using preferred_iterator_type =
decltype(std::declval);
}
template 
class adaptor_range : public detail::basic_range<
  adaptor_range, detail::iterator_adaptor,
  detail::iterator_adaptor<
  F, detail::preferred_iterator_type...> > {};
template 
class ref_vector : public adaptor_range > {};
template  class property_element;
template  using property_list = std::map >;
class context {
  typedef clover::property_list property_list;
  context(const property_list &, const ref_vector &);
  std::vector > devs;
};
}

using namespace clover;
context::context(const property_list &, const ref_vector &devs)
: devs(devs) {}


[Bug middle-end/63244] [4.9 regression] internal compiler error: Segmentation fault (program cc1plus)

2014-09-12 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63244

Markus Trippelsdorf  changed:

   What|Removed |Added

   Target Milestone|4.9.3   |4.9.2


[Bug middle-end/63244] [4.9 regression] internal compiler error: Segmentation fault (program cc1plus)

2014-09-12 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63244

--- Comment #5 from Markus Trippelsdorf  ---
(gdb) bt
#0  analyze_functions () at ../../gcc/gcc/cgraphunit.c:1042
#1  0x006e03f0 in finalize_compilation_unit () at
../../gcc/gcc/cgraphunit.c:2326
#2  0x00594dd4 in cp_write_global_declarations () at
../../gcc/gcc/cp/decl2.c:4643
#3  0x00951a4d in compile_file () at ../../gcc/gcc/toplev.c:562
#4  0x00953620 in do_compile () at ../../gcc/gcc/toplev.c:1917
#5  toplev_main (argc=15, argv=0x7fffdfb8) at ../../gcc/gcc/toplev.c:1993
#6  0x775fcfd0 in __libc_start_main () from /lib/libc.so.6
#7  0x0052cf61 in _start ()
(gdb) l
1037  will be later needed to output debug info.  */
1038  if (DECL_ABSTRACT_ORIGIN (decl))
1039{
1040  struct cgraph_node *origin_node
1041  = cgraph_get_node (DECL_ABSTRACT_ORIGIN (decl));
1042  origin_node->used_as_abstract_origin = true;
1043}
1044}
1045  else
1046{


[Bug middle-end/63244] [4.9 regression] internal compiler error: Segmentation fault (program cc1plus)

2014-09-12 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63244

Markus Trippelsdorf  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
  Known to work||4.7.3, 5.0
   Last reconfirmed||2014-09-12
  Component|c++ |middle-end
 CC||trippels at gcc dot gnu.org
 Ever confirmed|0   |1
Summary|x86_64-pc-linux-gnu-g++:|[4.9 regression] internal
   |internal compiler error:|compiler error:
   |Segmentation fault (program |Segmentation fault (program
   |cc1plus)|cc1plus)
   Target Milestone|--- |4.9.3
  Known to fail||4.9.2

--- Comment #4 from Markus Trippelsdorf  ---
markus@x4 tmp % cat context.ii
namespace std {
template 
void declval();
class A;
}
namespace detail {
template 
class iterator_adaptor;
template 
class basic_range;
template 
using preferred_iterator_type = decltype(std::declval);
}
template 
class adaptor_range
: detail::basic_range<
  adaptor_range,
  detail::iterator_adaptor...>,
  detail::iterator_adaptor...>> {};
template 
using property_list = std::A;
class B {
  B(const property_list& p1, const adaptor_range& p2);
};
B::B(const ::property_list& p1, const adaptor_range& p2) {}

markus@x4 tmp % gdb --args g++ -std=c++11 -c context.ii
Reading symbols from g++...done.
(gdb) run
Starting program: /usr/bin/g++ -std=c++11 -c context.ii
process 30304 is executing new program:
/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.2/g++
[New process 30308]
process 30308 is executing new program:
/usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.2/cc1plus

Program received signal SIGSEGV, Segmentation fault.
[Switching to process 30308]
0x00c2ffd6 in analyze_functions() ()
(gdb) bt
#0  0x00c2ffd6 in analyze_functions() ()
#1  0x00c2ed95 in finalize_compilation_unit() ()
#2  0x00d2a2d4 in cp_write_global_declarations() ()
#3  0x00c29020 in compile_file() [clone .lto_priv.2474] ()
#4  0x00b6ccd7 in toplev_main(int, char**) ()
#5  0x77741fd0 in __libc_start_main () from /lib/libc.so.6
#6  0x00b66a93 in _start ()
(gdb)