Re: [patch, libgfortran RFC] Installation script for OpenCoarrays to enable multi-image gfortran

2017-01-31 Thread FX
Hi Damian,

> If you're able to join our weekly OpenCoarrays teleconference tomorrow at 10 
> AM Pacific time, please let me know your gmail address so that I can add you 
> to the call on Hangouts.  I really would like to resolve these issues more 
> efficiently than is possible by email.  I'm reasonably certain we can either 
> reach a resolution or decide this won't work in the span of a 1-hour 
> teleconference rather than stretching the discussion out over several days by 
> email.

I won’t be able to attend, sorry.
I feel we’ve reached the point where opinion of other maintainers would be good 
to hear. 

FX

Re: How to configure a bi-arch PowerPC GCC?

2017-01-31 Thread Segher Boessenkool
On Mon, Jan 30, 2017 at 11:38:19AM +0100, Sebastian Huber wrote:
> >The IEEE128 code almost certainly has some bugs on non-Linux 
> >configurations.
> >You could try debugging it, or you could avoid it (for now) by e.g. making
> >long double the same as double.
> 
> If I set rs6000_long_double_type_size to 64, then I can build all libgcc 
> multilibs including the one for -m64 -mcpu=e6500.

Good, so you have a way forward now.  You probably do not want to keep
this forever, of course ;-)

> I am a bit surprised 
> that the GCC support for 64-bit PowerPC is so extremely Linux-dependent. 

It is not.  It also supports FreeBSD (which of course is very much like
Linux), and AIX and Darwin.

But the focus is on Linux, sure.

> I guess that I have to figure out all the magic configuration bits to 
> get everything set up like it is on Linux.  It would be nice if the 
> working Linux configuration bits are the default.

There are hundreds of knobs you can turn.  Not all combinations make
sense.  Not all the non-sensical combinations are handled gracefully.

> With rs6000_long_double_type_size == 128, then I get the attached ICEs.
> 
> I would be glad to get some advice how I can debug them, since I have no 
> idea how the compiler works actually if it comes to code generation.

The IEEE128 code is quite new, and of course still has bugs.  You do
not want to use "double-double" in a new ABI though.

> /home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c:2035:1: error: 
> unrecognizable insn:
>  }
>  ^
> (insn 59 58 60 2 (set (reg:CCFP 219)
> (compare:CCFP (reg/v:TF 193 [ x ])
> (reg/v:TF 193 [ x ]))) 
> "/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c":1990 -1
>  (nil))

This is probably created via:
(define_expand "cbranch4"
  [(use (match_operator 0 "rs6000_cbranch_operator"
 [(match_operand:FP 1 "gpc_reg_operand" "")
  (match_operand:FP 2 "gpc_reg_operand" "")]))
   (use (match_operand 3 ""))]
  ""
  "
{
  rs6000_emit_cbranch (mode, operands);
  DONE;
}")

which does
  condition_rtx = rs6000_generate_compare (operands[0], mode);

which then does
  if (!TARGET_FLOAT128_HW && FLOAT128_VECTOR_P (mode))
comp_mode = CCmode;
  else if (FLOAT_MODE_P (mode))
comp_mode = CCFPmode;
  else


so it seems you have TARGET_FLOAT128_HW set?

> /home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c: In function '__multc3':
> /home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c:2035:1: error: unable 
> to generate reloads for:
>  }
>  ^
> (insn 138 1211 139 16 (set (reg/v:TF 203 [ a ])
> (unspec:TF [
> (reg:TF 237)
> (reg/v:TF 203 [ a ])
> (reg:TF 238)
> ] UNSPEC_COPYSIGN)) 
> "/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c":1998 940 
> {copysigntf3_soft}
>  (expr_list:REG_DEAD (reg:TF 238)
> (nil)))

But this one has it off.  Huh.  (The _soft is only generated with it off).

> /home/EB/sebastian_h/archive/gcc-git/newlib/libm/common/sl_finite.c:22:10: 
> internal compiler error: in validate_condition_mode, at 
> config/rs6000/rs6000.c:20551
>return __builtin_isfinite (x);
>   ^~
> 0xd5ed1b validate_condition_mode(rtx_code, machine_mode)
>   /home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.c:20547
> 0xd5f12c rs6000_generate_compare
>   /home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.c:24323
> 0xd63a92 rs6000_emit_sCOND(machine_mode, rtx_def**)
>   /home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.c:24736
> 0xf0998a gen_cstoretf4(rtx_def*, rtx_def*, rtx_def*, rtx_def*)
>   /home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.md:11703

Machine mode is CCFPmode, but what is the RTL code?  rs6000_generate_compare
made a mess here.

> /home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/libsupc++/fundamental_type_info.cc:35:1:
>  internal compiler error: in write_builtin_type, at cp/mangle.c:2574
>  }
>  ^
> 0x65a189 write_builtin_type
>   /home/EB/sebastian_h/archive/gcc-git/gcc/cp/mangle.c:2574

So it doesn't have a valid FP type here.

All the rest of your errors are duplicates or fallout from earlier
errors.


Segher


Re: [patch, libgfortran RFC] Installation script for OpenCoarrays to enable multi-image gfortran

2017-01-31 Thread FX
> As a fallback, I'd suggest a script that checks for package management, uses 
> it if present, let's the user specify the package manager if known, and exit 
> with an error condition if none of these conditions are satisfied.  It still 
> presents unnecessary roadblocks that our scripts solve, e.g., some macOS 
> users neither have nor want to install package management, many package 
> managers require sudo privileges, there are many different package management 
> systems to check for, etc.  Our scripts are long because we attempt to lower 
> the barrier of entry to rock bottom.

I understand that. GCC’s goal is quite different: it wants to build on a 
majority of systems, with few — but well-defined — prerequisites, and in a 
large number of configurations. That includes native systems, distributed 
compilation, cross-compilers, canadian crosses, etc. (I omit here the 
bare-bones and embedded systems as those are likely not targets for 
OpenCoarrays anyway).

It’s great for OpenCoarrays to work “out of the box” on any compiler, 
autodetect its environnement and everything. I just don’t think it currently 
fits within GCC’s view of the build system.

Also, there is the question of bootstrap: GCC can be bootstrapped on a compiler 
with a non-GCC compiler, but on such system libgfortran we be built as part of 
the compiler, while a GCC-adapted MPI library may not yet be available (because 
the compiler has not yet finished building).

FX

gcc-5-20170131 is now available

2017-01-31 Thread gccadmin
Snapshot gcc-5-20170131 is now available on
  ftp://gcc.gnu.org/pub/gcc/snapshots/5-20170131/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.

This snapshot has been generated from the GCC 5 SVN branch
with the following options: svn://gcc.gnu.org/svn/gcc/branches/gcc-5-branch 
revision 245074

You'll find:

 gcc-5-20170131.tar.bz2   Complete GCC

  MD5=e5a4c2c6905a16b0f0fc10a257a7a616
  SHA1=613588018ea4547e6426dc637aa8519f627870c3

Diffs from 5-20170124 are available in the diffs/ subdirectory.

When a particular snapshot is ready for public consumption the LATEST-5
link is updated and a message is sent to the gcc list.  Please do not use
a snapshot before it has been announced that way.