public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/64433] New: Segmentation fault while compiling
@ 2014-12-29 13:13 aleksis at mikrotik dot com
  2014-12-29 15:46 ` [Bug c++/64433] " jakub at gcc dot gnu.org
  2014-12-29 22:37 ` ktietz at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: aleksis at mikrotik dot com @ 2014-12-29 13:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64433

            Bug ID: 64433
           Summary: Segmentation fault while compiling
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: aleksis at mikrotik dot com

This code causes segmentation fault while compiling.


#include <cstddef>

template<int Num>
class N {
    static constexpr int num = Num;
};

template<class T> using NDef = N<offsetof(T, T::m)>;
template<class T> using TDef = NDef<T>;



GCC version: 4.9.2
compiled with: g++ --std=c++11 -c test.cpp
system: Linux 3.18.1-1-ARCH #1 SMP PREEMPT Wed Dec 17 15:40:09 CET 2014 x86_64
GNU/Linux


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

* [Bug c++/64433] Segmentation fault while compiling
  2014-12-29 13:13 [Bug c++/64433] New: Segmentation fault while compiling aleksis at mikrotik dot com
@ 2014-12-29 15:46 ` jakub at gcc dot gnu.org
  2014-12-29 22:37 ` ktietz at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-12-29 15:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64433

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-12-29
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |jason at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
r181112 still rejects this, r181150 already ICEs.


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

* [Bug c++/64433] Segmentation fault while compiling
  2014-12-29 13:13 [Bug c++/64433] New: Segmentation fault while compiling aleksis at mikrotik dot com
  2014-12-29 15:46 ` [Bug c++/64433] " jakub at gcc dot gnu.org
@ 2014-12-29 22:37 ` ktietz at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: ktietz at gcc dot gnu.org @ 2014-12-29 22:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64433

Kai Tietz <ktietz at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ktietz at gcc dot gnu.org

--- Comment #2 from Kai Tietz <ktietz at gcc dot gnu.org> ---
Issue is access of the type of a COMPONENT_REF in finish_offsetof.  For the
template the COMPONENT_REF has NULL_TREE type.

Actually it seems that we should check here for in-template case.


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

end of thread, other threads:[~2014-12-29 22:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-29 13:13 [Bug c++/64433] New: Segmentation fault while compiling aleksis at mikrotik dot com
2014-12-29 15:46 ` [Bug c++/64433] " jakub at gcc dot gnu.org
2014-12-29 22:37 ` ktietz 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).