public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/52237] New: Template specialization and operator overloading causes Segmentation Fault
@ 2012-02-13 18:24 achille at justin dot tv
  2012-02-13 18:36 ` [Bug c++/52237] " redi at gcc dot gnu.org
  2012-02-14 12:23 ` rguenth at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: achille at justin dot tv @ 2012-02-13 18:24 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52237
           Summary: Template specialization and operator overloading
                    causes Segmentation Fault
    Classification: Unclassified
           Product: gcc
           Version: lto
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: achille@justin.tv


Created attachment 26652
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26652
Processed source

The following code snipet makes G++ 4.6.1 Segfault on Ubuntu 11.10 64bits.

Command line: g++ <file> -std=c++0x

Compiler output:
/tmp/test.cpp: In lambda function:
/tmp/test.cpp:14:22: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.
Preprocessed source stored into /tmp/ccxSIRSc.out file, please attach this to
your bugreport.

Code:

template < typename T, typename Signature >
class __lambda
{
};

template < typename T, typename R, typename... Args >
class __lambda<T, R(Args...)>
{

public:

  R operator()(Args&... args)
  {
    return _t(args...);
  }

private:
  T _t;

};

int main()
{
  return 0;
}


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/52237] Template specialization and operator overloading causes Segmentation Fault
  2012-02-13 18:24 [Bug c++/52237] New: Template specialization and operator overloading causes Segmentation Fault achille at justin dot tv
@ 2012-02-13 18:36 ` redi at gcc dot gnu.org
  2012-02-14 12:23 ` rguenth at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2012-02-13 18:36 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-02-13
            Version|lto                         |4.6.1
     Ever Confirmed|0                           |1
      Known to fail|                            |4.7.0

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-02-13 18:36:28 UTC ---
The name __lambda is reserved for the implementation, you must not use it so
your program is invalid.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/52237] Template specialization and operator overloading causes Segmentation Fault
  2012-02-13 18:24 [Bug c++/52237] New: Template specialization and operator overloading causes Segmentation Fault achille at justin dot tv
  2012-02-13 18:36 ` [Bug c++/52237] " redi at gcc dot gnu.org
@ 2012-02-14 12:23 ` rguenth at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-02-14 12:23 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-02-14 12:22:37 UTC ---
.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-02-14 12:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-13 18:24 [Bug c++/52237] New: Template specialization and operator overloading causes Segmentation Fault achille at justin dot tv
2012-02-13 18:36 ` [Bug c++/52237] " redi at gcc dot gnu.org
2012-02-14 12:23 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).