public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/19666] New: ICE in fold_convert
@ 2005-01-28  9:30 jakub at gcc dot gnu dot org
  2005-01-28  9:49 ` [Bug c++/19666] " steven at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-01-28  9:30 UTC (permalink / raw)
  To: gcc-bugs

struct L { void *a; };
struct S {
  static S *foo (L *x)
  {
    return (S *) ((char *) x - (unsigned long) &(((S *) 0)->*&S::a));
  }
  L a;
};

causes ICE in fold_convert (abort at the very end of the function).
Works fine with G++ 3.2.3-RH and HEAD.
Breakpoint 2, fold_convert (type=0x2a97b66d00, arg=0x2a97d65c60) at
../../gcc/fold-const.c:1917
1917      abort ();
(gdb) p debug_tree(type)
 <integer_type 0x2a97b66d00 long int DI
    size <integer_cst 0x2a97b64930 type <integer_type 0x2a97b78410 bit_size_type>
constant 64>
    unit size <integer_cst 0x2a97b64a80 type <integer_type 0x2a97b78340 long
unsigned int> constant 8>
    align 64 symtab 0 alias set -1 precision 64 min <integer_cst 0x2a97b64a20
-9223372036854775808> max <integer_cst 0x2a97b64a50 9223372036854775807>>
$1 = void
(gdb) p debug_tree(arg)
 <negate_expr 0x2a97d65c60
    type <offset_type 0x2a97d63820
        type <record_type 0x2a97d58680 L type_1 type_5 DI
            size <integer_cst 0x2a97b749c0 constant 64>
            unit size <integer_cst 0x2a97b74a80 constant 8>
            align 64 symtab 0 alias set -1 fields <field_decl 0x2a97d589c0 a>
            X() X(constX&) this=(X&) n_parents 0 use_template=0 interface-unknown
            member-functions <tree_vec 0x2a97d5d980
                elt 0 <overload 0x2a97d50fc0>
                elt 2 <function_decl 0x2a97d5fa90 operator=>
                elt 3 <overload 0x2a97d61040>
                elt 4 <overload 0x2a97d61000>>
            pointer_to_this <pointer_type 0x2a97d58750> reference_to_this
<reference_type 0x2a97d5f680> chain <type_decl 0x2a97d58820 L>>
        DI size <integer_cst 0x2a97b749c0 64> unit size <integer_cst 0x2a97b74a80
8>
        align 64 symtab 0 alias set -1 basetype <record_type 0x2a97d604e0 S>>
    constant
    arg 0 <ptrmem_cst 0x2a97d658a0 type <offset_type 0x2a97d63820>
        constant>>
$2 = void

-- 
           Summary: ICE in fold_convert
           Product: gcc
           Version: 3.4.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jakub at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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

end of thread, other threads:[~2005-05-02 11:03 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-28  9:30 [Bug c++/19666] New: ICE in fold_convert jakub at gcc dot gnu dot org
2005-01-28  9:49 ` [Bug c++/19666] " steven at gcc dot gnu dot org
2005-01-28 10:02 ` jakub at gcc dot gnu dot org
2005-01-28 14:06 ` [Bug c++/19666] [3.4 Regression] " pinskia at gcc dot gnu dot org
2005-01-28 14:08 ` pinskia at gcc dot gnu dot org
2005-02-11  2:07 ` [Bug c++/19666] [3.3/3.4 Regression] Trouble with prt-to-members: rejects-valid/ICE " reichelt at gcc dot gnu dot org
2005-02-11 16:40 ` jakub at gcc dot gnu dot org
2005-02-12  3:28 ` cvs-commit at gcc dot gnu dot org
2005-02-12  3:50 ` cvs-commit at gcc dot gnu dot org
2005-02-12  4:00 ` [Bug c++/19666] [3.3 " pinskia at gcc dot gnu dot org
2005-04-30 14:46 ` gdr at gcc dot gnu dot org
2005-04-30 16:33 ` gdr at gcc dot gnu dot org
2005-05-02 11:03 ` reichelt at gcc dot gnu dot 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).