[Bug bootstrap/63545] ICE building GCC hash_tablecselib_hasher,xcallocator::find_slot_with_hash

2014-10-17 Thread bill.klees at teamquest dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63545

--- Comment #3 from Bill Klees bill.klees at teamquest dot com ---
Simplified Preprocessed source fails with same error


typedef int TItype __attribute__((mode(TI)));
typedef int DItype __attribute__((mode(DI)));
typedef unsigned int UDItype __attribute__((mode(DI)));

struct DWstruct { DItype high, low; };

typedef union
{
struct DWstruct s;
TItype ll;
} DWunion;

TItype
__multi3(TItype u, TItype v)
{
const DWunion uu = { .ll = u };
const DWunion vv = { .ll = v };
DWunion w = { .ll = ({ DWunion __w; __asm__(xma.hu %0 = %2, %3,
f0\n\txma.l %1 = %2, %3, f0 : =f (__w.s.high)
, =f (__w.s.low) : f (uu.s.low), f (vv.s.low)); __w.ll; }) };

w.s.high += ((UDItype)uu.s.low * (UDItype)vv.s.high
+ (UDItype)uu.s.high * (UDItype)vv.s.low);

return w.ll;
}


[Bug bootstrap/63545] ICE building GCC hash_tablecselib_hasher,xcallocator::find_slot_with_hash

2014-10-17 Thread bill.klees at teamquest dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63545

--- Comment #4 from Bill Klees bill.klees at teamquest dot com ---
Much simpler test case
--
struct DWstruct { int high, low; };

typedef union
{
struct DWstruct s;
int ll;
} DWunion;

int
__multi3(int u, int v)
{
const DWunion uu = { .ll = u };
return 0;
}


Build Line:
---
/u/scratch/users/b/gcc/hp/gcc491_debug/./gcc/xgcc
-B/u/scratch/users/b/gcc/hp/gcc491_debug/./gcc/
-B/shares/source/itlinks/opt/hpux_ia64/11.2/32/gcc-4.9.1/ia64-hp-hpux11.23/bin/
-mlp64 -g -O2 -o _muldi3.o -c test2.c


Traceback of failure

#0  0x5830880 in unknown_procedure ()
warning: Attempting to unwind past bad PC 0x5830880
#1  0x555be50 in hash_tablecselib_hasher,xcallocator::find_slot_with_hash (
this=Unhandled dwarf expression opcode
)
#2  0x4501220:0 in _ZL16cselib_find_slotP7rtx_defj13insert_option12machine_mode
(x=Unhandled dwarf expression opcode
)
#3  0x45013a0:0 in cselib_lookup (x=Unhandled dwarf expression opcode
)
#4  0x50aa630:0 in _ZL8use_typeP7rtx_defP14count_use_infoP12machine_mode
(loc=Unhandled dwarf expression opcode
)
#5  0x50aaa70:0 in _ZL8add_usesPP7rtx_defPv (ploc=Unhandled dwarf expression
opcode
)
#6  0x4aeac10:0 in for_each_rtx (x=Unhandled dwarf expression opcode
)
#7  0x50a6070:0 in _ZL10add_uses_1PP7rtx_defPv (x=0x76f8b6f8, cui=0x7fffc680)
#8  0x4ae4bf0:0 in note_uses (pbody=Unhandled dwarf expression opcode
)
#9  0x50abfb0:0 in _ZL13add_with_setsP7rtx_defP10cselib_seti (insn=Unhandled
dwarf expression opcode
)
#10 0x4506080:0 in _ZL18cselib_record_setsP7rtx_def (insn=0x76f8b6e0)
#11 0x450a3d0:0 in cselib_process_insn (insn=Unhandled dwarf expression opcode
)
#12 0x50b8980:0 in _ZL13vt_initializev ()
#13 0x50d6840:0 in variable_tracking_main ()
#14 0x511f1c0:0 in _ZL10ia64_reorgv ()
#15 0x4adbe50:0 in _GLOBAL__N_1::pass_machine_reorg::execute (this=0x49fe960:0)
at /shares/scratch/users/b/gcc/hp/gcc-4.9.1/./gcc/reorg.c:3936
#16 0x49fe960:0 in execute_one_pass (pass=Unhandled dwarf expression opcode
)
#17 0x49ff4a0:0 in execute_pass_list (pass=0x4027c610)
#18 0x49ff500:0 in execute_pass_list (pass=0x4027bd50)
#19 0x49ff500:0 in execute_pass_list (pass=0x4027aed0)
---Type return to continue, or q return to quit---
#20 0x44de270:0 in _ZL15expand_functionP11cgraph_node (node=Unhandled dwarf
expression opcode
)
#21 0x44e3800:0 in compile ()
#22 0x44e4060:0 in finalize_compilation_unit ()
#23 0x4265f90:0 in c_write_global_declarations ()
#24 0x4bb8680:0 in _ZL12compile_filev ()
#25 0x4bbdb30:0 in toplev_main (argc=23, argv=0x75b8)
#26 0x5431a70:0 in main (argc=23, argv=0x75b8)
at /shares/scratch/users/b/gcc/hp/gcc-4.9.1/./gcc/main.c:37


[Bug bootstrap/63545] ICE building GCC hash_tablecselib_hasher,xcallocator::find_slot_with_hash

2014-10-16 Thread bill.klees at teamquest dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63545

--- Comment #2 from Bill Klees bill.klees at teamquest dot com ---
Created attachment 33734
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=33734action=edit
Preprocessed Source for Failing Compile


[Bug bootstrap/63545] New: ICE building GCC hash_tablecselib_hasher,xcallocator::find_slot_with_hash

2014-10-15 Thread bill.klees at teamquest dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63545

Bug ID: 63545
   Summary: ICE building GCC
hash_tablecselib_hasher,xcallocator::find_slot_with_
hash
   Product: gcc
   Version: 4.9.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
  Assignee: unassigned at gcc dot gnu.org
  Reporter: bill.klees at teamquest dot com
Target: ia64-hp-hpux11.23

Created attachment 33726
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=33726action=edit
config log from ia64-hp-hpux11.23\hpux64\libgcc

System
--
HP-UX clhpux1i B.11.23 U ia64


Configure Line
--
/shares/scratch/users/b/gcc/clhpux1i_32/gcc-4.9.1/./configure
--prefix=/shares/source/itlinks/opt/hpux_ia64/11.2/32/gcc-4.9.1
--with-gmp=/opt/32/gmp-6.0.0 --with-mpfr=/opt/32/mpfr-3.1.2
--with-mpc=/opt/32/mpc-1.0.2 --enable-languages=c,c++
CC=/opt/32/gcc-4.7.4/bin/gcc CXX=/opt/32/gcc-4.7.4/bin/g++ --disable-bootstrap
--with-gnu-as --with-as=/opt/binutils-2.24/bin/as --without-gnu-ld


Error during build
--
gmake[4]: Entering directory
`/shares/scratch/users/b/gcc/clhpux1i_32/gcc491_debug/ia64-hp-hpux11.23/hpux64/libgcc'
# If this is the top-level multilib, build all the other
# multilibs.
/u/scratch/users/b/gcc/clhpux1i_32/gcc491_debug/./gcc/xgcc
-B/u/scratch/users/b/gcc/clhpux1i_32/gcc491_debug/./gcc/
-B/shares/source/itlinks/opt/hpux_ia64/11.2/32/gcc-4.9.1/ia64-hp-hpux11.23/bin/
-B/shares/source/itlinks/opt/hpux_ia64/11.2/32/gcc-4.9.1/ia64-hp-hpux11.23/lib/
-isystem
/shares/source/itlinks/opt/hpux_ia64/11.2/32/gcc-4.9.1/ia64-hp-hpux11.23/include
-isystem
/shares/source/itlinks/opt/hpux_ia64/11.2/32/gcc-4.9.1/ia64-hp-hpux11.23/sys-include
   -g -O2 -mlp64 -O2  -g -O2 -DIN_GCC-DUSE_LIBUNWIND_EXCEPTIONS -W -Wall
-Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition  -isystem ./include   -g
-DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -I. -I. -I../../.././gcc
-I/shares/scratch/users/b/gcc/clhpux1i_32/gcc-4.9.1/./libgcc
-I/shares/scratch/users/b/gcc/clhpux1i_32/gcc-4.9.1/./libgcc/.
-I/shares/scratch/users/b/gcc/clhpux1i_32/gcc-4.9.1/./libgcc/../gcc
-I/shares/scratch/users/b/gcc/clhpux1i_32/gcc-4.9.1/./libgcc/../include-o
_muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c
/shares/scratch/users/b/gcc/clhpux1i_32/gcc-4.9.1/./libgcc/libgcc2.c
-fvisibility=hidden -DHIDE_EXPORTS
/shares/scratch/users/b/gcc/clhpux1i_32/gcc-4.9.1/./libgcc/libgcc2.c: In
function '__multi3':
/shares/scratch/users/b/gcc/clhpux1i_32/gcc-4.9.1/./libgcc/libgcc2.c:557:1:
internal compiler error: Segmentation fault
 }
 ^
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.
gmake[4]: *** [_muldi3.o] Error 1
gmake[4]: Leaving directory
`/shares/scratch/users/b/gcc/clhpux1i_32/gcc491_debug/ia64-hp-hpux11.23/hpux64/libgcc'
gmake[3]: *** [multi-do] Error 1
gmake[3]: Leaving directory
`/shares/scratch/users/b/gcc/clhpux1i_32/gcc491_debug/ia64-hp-hpux11.23/libgcc'
gmake[2]: *** [all-multi] Error 2
gmake[2]: Leaving directory
`/shares/scratch/users/b/gcc/clhpux1i_32/gcc491_debug/ia64-hp-hpux11.23/libgcc'
gmake[1]: *** [all-target-libgcc] Error 2
gmake[1]: Leaving directory
`/shares/scratch/users/b/gcc/clhpux1i_32/gcc491_debug'
gmake: *** [all] Error 2


Traceback from failure
--
(gdb) bt
#0  0x5830880 in unknown_procedure ()
warning: Attempting to unwind past bad PC 0x5830880
#1  0x555c170 in hash_tablecselib_hasher,xcallocator::find_slot_with_hash (
this=Unhandled dwarf expression opcode
)
#2  0x4501220:0 in _ZL16cselib_find_slotP7rtx_defj13insert_option12machine_mode
(x=Unhandled dwarf expression opcode
)
#3  0x45013a0:0 in cselib_lookup (x=Unhandled dwarf expression opcode
)
#4  0x4506460:0 in _ZL18cselib_record_setsP7rtx_def (insn=0x76d98a78)
#5  0x450a3d0:0 in cselib_process_insn (insn=Unhandled dwarf expression opcode
)
#6  0x52b6ab0:0 in _ZL18rest_of_handle_dsev ()
#7  0x49fe960:0 in execute_one_pass (pass=Unhandled dwarf expression opcode
)
#8  0x49ff4a0:0 in execute_pass_list (pass=0x4027b710)
#9  0x49ff500:0 in execute_pass_list (pass=0x4027aed0)
#10 0x44de270:0 in _ZL15expand_functionP11cgraph_node (node=Unhandled dwarf
expression opcode
)
#11 0x44e3800:0 in compile ()
#12 0x44e4060:0 in finalize_compilation_unit ()
#13 0x4265f90:0 in c_write_global_declarations ()
#14 0x4bb8680:0 in _ZL12compile_filev ()
#15 0x4bbdb30:0 in toplev_main (argc=75, argv=0x7178)
#16 0x5431a70:0 in main (argc=75, argv=0x7178)
at /shares/scratch/users/b/gcc/clhpux1i_32/gcc-4.9.1/./gcc/main.c:37


Notes
-
The failed compilation step is:

/u/scratch/users/b/gcc/clhpux1i_32/gcc491_debug/./gcc/xgcc
-B/u/scratch/users/b/gcc/clhpux1i_32/gcc491_debug/./gcc/
-B/shares/source/itlinks/opt

[Bug c++/63502] New: ICE in s390_add_constant when building with g++ in S390x Linux

2014-10-09 Thread bill.klees at teamquest dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63502

Bug ID: 63502
   Summary: ICE in s390_add_constant when building with g++ in
S390x Linux
   Product: gcc
   Version: 4.9.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: bill.klees at teamquest dot com

Created attachment 33673
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=33673action=edit
ii file.

System
--
Linux 2.6.18-238.el5 #1 SMP Sun Dec 19 14:27:28 EST 2010 s390x s390x s390x
GNU/Linux

GCC
---
Using built-in specs.
COLLECT_GCC=/opt/gcc-4.9.1/bin/g++
COLLECT_LTO_WRAPPER=/opt/gcc-4.9.1/libexec/gcc/s390x-ibm-linux-gnu/4.9.1/lto-wrapper
Target: s390x-ibm-linux-gnu
Configured with: /home/bjk/gcc/gcc-4.9.1/./configure --prefix=/opt/gcc-4.9.1
--with-gmp=/opt/gmp-6.0.0 --with-mpfr=/opt/mpfr-3.1.2 --with-mpc=/opt/mpc-1.0.2
--enable-languages=c,c++ CC=/opt/gcc-4.7.4/bin/gcc CXX=/opt/gcc-4.7.4/bin/g++
--disable-bootstrap
Thread model: posix
gcc version 4.9.1 (GCC)

Source File
---
typedef   struct
   {
   char   system_name[100];
   char   system_model[100];
   char   original_system_name[100];
   intphysical_system;
   }   SB;

typedef   struct
   {
   int work_at_sys;
   }   MWL, *LPMWL;

typedef  struct
   {
   MWL *sys_tier;
   int  shadow_wl;
   int  util_queue_num;
   }   CB;

typedef struct
   {
   int  current_system;
   CB  *clas;
   int number_systems;
   SB *systems;
   int  nr;
   } MO, *LPMO;


void ds(LPMO mptr, int selected_index)
{

for (int i = selected_index; i  mptr-number_systems; i++)
{
   mptr-systems[i] = mptr-systems[i+1];

   for (int r = 1; r = mptr-nr; r++)
  mptr-clas[r].sys_tier[i] = mptr-clas[r].sys_tier[i+1];

   mptr-systems[i].physical_system -= 1;
}

if (mptr-current_system = selected_index)
   {
   if (mptr-current_system == 0)
  mptr-current_system = 1;
   }
}


Build Command
-
/opt/gcc-4.9.1/bin/g++ -m31 -O1 -c -o m.o m.c


Result
--
m.c: In function âvoid ds(LPMO, int)â:
m.c:50:1: internal compiler error: in s390_add_constant, at
config/s390/s390.c:6403
 }
 ^
0x8080f0c9 s390_add_constant
/home/bjk/gcc/gcc-4.9.1/./gcc/config/s390/s390.c:6403
0x8080f0c9 s390_add_constant
/home/bjk/gcc/gcc-4.9.1/./gcc/config/s390/s390.c:6395
0x808232d1 s390_mainpool_start
/home/bjk/gcc/gcc-4.9.1/./gcc/config/s390/s390.c:6699
0x808232d1 s390_reorg
/home/bjk/gcc/gcc-4.9.1/./gcc/config/s390/s390.c:11350
0x8055e927 rest_of_handle_machine_reorg
/home/bjk/gcc/gcc-4.9.1/./gcc/reorg.c:3936
0x8055e927 execute
/home/bjk/gcc/gcc-4.9.1/./gcc/reorg.c:3966
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See http://gcc.gnu.org/bugs.html for instructions.


Notes
-
Builds successfully using -O0, -O2, and -O3
Builds successfully with all optimizations when using -m64 instead of -m31

[Bug target/63502] ICE in s390_add_constant when building with g++ in S390x Linux

2014-10-09 Thread bill.klees at teamquest dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63502

--- Comment #1 from Bill Klees bill.klees at teamquest dot com ---
Setting breakpoint at s390_add_constant

Breakpoint 5, s390_add_constant (pool=0x80da0880, val=0x20003889cc0,
mode=BLKmod
at /home/bjk/gcc/gcc-4.9.1/./gcc/config/s390/s390.c:6400
6400  for (i = 0; i  NR_C_MODES; i++)
(gdb) list
6395s390_add_constant (struct constant_pool *pool, rtx val, enum
machine_mode mode)
6396{
6397  struct constant *c;
6398  int i;
6399
6400  for (i = 0; i  NR_C_MODES; i++)
6401if (constant_modes[i] == mode)
6402  break;
6403  gcc_assert (i != NR_C_MODES);
6404
(gdb) print constant_modes
$4 = {TFmode, TImode, TDmode, DFmode, DImode, DDmode, SFmode, SImode, SDmode,
HImode, QImode}
(gdb) print mode
$5 = BLKmode
(gdb)

Failure occurs on the assert since BLKmode is not in the list.