public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/56518] New: Segmentation fault
@ 2013-03-04 11:08 elisey.zanko at gmail dot com
  2013-03-04 11:10 ` [Bug c++/56518] " elisey.zanko at gmail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: elisey.zanko at gmail dot com @ 2013-03-04 11:08 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56518
           Summary: Segmentation fault
    Classification: Unclassified
           Product: gcc
           Version: 4.6.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: elisey.zanko@gmail.com


Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.3/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.6.3/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.6.3/work/gcc-4.6.3/configure
--prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.3
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.3
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.3/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.3/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include/g++-v4
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec
--disable-fixed-point --without-ppl --without-cloog --enable-lto --enable-nls
--without-included-gettext --with-system-zlib --enable-obsolete
--disable-werror --enable-secureplt --disable-multilib --enable-libmudflap
--disable-libssp --enable-libgomp
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.6.3/python
--enable-checking=release --disable-libgcj --enable-libstdcxx-time
--enable-languages=c,c++,fortran --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu --enable-targets=all
--with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.6.3 p1.11,
pie-0.5.2'
Thread model: posix
gcc version 4.6.3 (Gentoo 4.6.3 p1.11, pie-0.5.2)
COLLECT_GCC_OPTIONS='-std=c++0x' '-save-temps' '-v' '-o' 'test'
'-mtune=generic' '-march=x86-64'
 /usr/libexec/gcc/x86_64-pc-linux-gnu/4.6.3/cc1plus -E -quiet -v -D_GNU_SOURCE
test.cpp -mtune=generic -march=x86-64 -std=c++0x -fpch-preprocess -o test.ii
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include/g++-v4
 /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include/g++-v4/x86_64-pc-linux-gnu
 /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include/g++-v4/backward
 /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include
 /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include-fixed
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-std=c++0x' '-save-temps' '-v' '-o' 'test'
'-mtune=generic' '-march=x86-64'
 /usr/libexec/gcc/x86_64-pc-linux-gnu/4.6.3/cc1plus -fpreprocessed test.ii
-quiet -dumpbase test.cpp -mtune=generic -march=x86-64 -auxbase test -std=c++0x
-version -o test.s
GNU C++ (Gentoo 4.6.3 p1.11, pie-0.5.2) version 4.6.3 (x86_64-pc-linux-gnu)
        compiled by GNU C version 4.6.3, GMP version 5.1.0, MPFR version
3.1.1-p2, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++ (Gentoo 4.6.3 p1.11, pie-0.5.2) version 4.6.3 (x86_64-pc-linux-gnu)
        compiled by GNU C version 4.6.3, GMP version 5.1.0, MPFR version
3.1.1-p2, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 64306da8006a5416135a72df2a9600e1
test.cpp: In function ‘int main(int, char**)’:
test.cpp:9:36: internal compiler error: Segmentation fault


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

* [Bug c++/56518] Segmentation fault
  2013-03-04 11:08 [Bug c++/56518] New: Segmentation fault elisey.zanko at gmail dot com
@ 2013-03-04 11:10 ` elisey.zanko at gmail dot com
  2013-03-04 11:21 ` paolo.carlini at oracle dot com
  2013-03-04 12:53 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: elisey.zanko at gmail dot com @ 2013-03-04 11:10 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #1 from Elisey Zanko <elisey.zanko at gmail dot com> 2013-03-04 11:10:09 UTC ---
Created attachment 29579
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29579
A preprocessed file causing bug


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

* [Bug c++/56518] Segmentation fault
  2013-03-04 11:08 [Bug c++/56518] New: Segmentation fault elisey.zanko at gmail dot com
  2013-03-04 11:10 ` [Bug c++/56518] " elisey.zanko at gmail dot com
@ 2013-03-04 11:21 ` paolo.carlini at oracle dot com
  2013-03-04 12:53 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-03-04 11:21 UTC (permalink / raw)
  To: gcc-bugs


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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|elisey.zanko at gmail dot   |
                   |com                         |
      Known to work|                            |4.7.0, 4.8.0
         Resolution|                            |WORKSFORME

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2013-03-04 11:20:01 UTC ---
Both 4.7 and mainline are fine.


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

* [Bug c++/56518] Segmentation fault
  2013-03-04 11:08 [Bug c++/56518] New: Segmentation fault elisey.zanko at gmail dot com
  2013-03-04 11:10 ` [Bug c++/56518] " elisey.zanko at gmail dot com
  2013-03-04 11:21 ` paolo.carlini at oracle dot com
@ 2013-03-04 12:53 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-03-04 12:53 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|WORKSFORME                  |FIXED
      Known to fail|                            |4.6.4

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> 2013-03-04 12:52:43 UTC ---
The ICE is

#0  0x00000000007bafa2 in c_common_signed_or_unsigned_type (unsignedp=1, 
    type=0x0)
    at /space/rguenther/src/svn/gcc-4_6-branch/gcc/c-family/c-common.c:3018
#1  0x00000000007bfe47 in shorten_compare (op0_ptr=0x7fffffffcb80, 
    op1_ptr=0x7fffffffcb78, restype_ptr=0x7fffffffcb70, 
    rescode_ptr=0x7fffffffcb6c)
    at /space/rguenther/src/svn/gcc-4_6-branch/gcc/c-family/c-common.c:3567

3562      else if (unsignedp0 == unsignedp1 && real1 == real2
3563               && TYPE_PRECISION (TREE_TYPE (primop0)) < TYPE_PRECISION
(*restype_ptr)
3564               && TYPE_PRECISION (TREE_TYPE (primop1)) < TYPE_PRECISION
(*restype_ptr))
3565        {
3566          type = common_type (TREE_TYPE (primop0), TREE_TYPE (primop1));
3567          type = c_common_signed_or_unsigned_type (unsignedp0
3568                                                   || TYPE_UNSIGNED
(*restype_ptr),
3569                                                   type);

which ends up calling cp_common_type which has (still also on trunk):

static tree
cp_common_type (tree t1, tree t2)
{
...
  if (SCOPED_ENUM_P (t1) || SCOPED_ENUM_P (t2))
    {
      if (TYPE_MAIN_VARIANT (t1) == TYPE_MAIN_VARIANT (t2))
        return build_type_attribute_variant (t1, attributes);
      else
        return NULL_TREE;
    }

but common_type () is not expected to return NULL_TREE.

ISTR this bug, it got fixed for 4.7+.


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

end of thread, other threads:[~2013-03-04 12:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-04 11:08 [Bug c++/56518] New: Segmentation fault elisey.zanko at gmail dot com
2013-03-04 11:10 ` [Bug c++/56518] " elisey.zanko at gmail dot com
2013-03-04 11:21 ` paolo.carlini at oracle dot com
2013-03-04 12:53 ` 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).