[Bug target/87496] ICE in aggregate_value_p at gcc/function.c:2046

2023-05-15 Thread pault at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87496

Paul Thomas  changed:

   What|Removed |Added

 CC||pault at gcc dot gnu.org

--- Comment #18 from Paul Thomas  ---
Sorry for the noise - a bit of a slip occurred in the ChangeLog.

Cheers

Paul

[Bug target/87496] ICE in aggregate_value_p at gcc/function.c:2046

2023-05-15 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87496

--- Comment #17 from CVS Commits  ---
The master branch has been updated by Paul Thomas :

https://gcc.gnu.org/g:6c95fe9bc0553743098eeaa739f14b885050fa42

commit r14-870-g6c95fe9bc0553743098eeaa739f14b885050fa42
Author: Paul Thomas 
Date:   Tue May 16 06:35:40 2023 +0100

Fortran: Fix an assortment of bugs

2023-05-16  Paul Thomas  

gcc/fortran
PR fortran/105152
* interface.cc (gfc_compare_actual_formal): Emit an error if an
unlimited polymorphic actual is not matched either to an
unlimited or assumed type formal argument.

PR fortran/100193
* resolve.cc (resolve_ordinary_assign): Emit an error if the
var expression of an ordinary assignment is a proc pointer
component.

PR fortran/87496
* trans-array.cc (gfc_walk_array_ref): Provide assumed shape
arrays coming from interface mapping with a viable arrayspec.

PR fortran/103389
* trans-expr.cc (gfc_conv_intrinsic_to_class): Tidy up flagging
of unlimited polymorphic 'class_ts'.
(gfc_conv_gfc_desc_to_cfi_desc): Assumed type is unlimited
polymorphic and should accept any actual type.

PR fortran/104429
(gfc_conv_procedure_call): Replace dreadful kludge with a call
to gfc_finalize_tree_expr. Avoid dereferencing a void pointer
by giving it the pointer type of the actual argument.

PR fortran/82774
(alloc_scalar_allocatable_subcomponent): Shorten the function
name and replace the symbol argument with the se string length.
If a deferred length character length is either not present or
is not a variable, give the typespec a variable and assign the
string length to that. Use gfc_deferred_strlen to find the
hidden string length component.
(gfc_trans_subcomponent_assign): Convert the expression before
the call to alloc_scalar_allocatable_subcomponent so that a
good string length is provided.
(gfc_trans_structure_assign): Remove the unneeded derived type
symbol from calls to gfc_trans_subcomponent_assign.

gcc/testsuite/
PR fortran/105152
* gfortran.dg/pr105152.f90 : New test

PR fortran/100193
* gfortran.dg/pr100193.f90 : New test

PR fortran/87946
* gfortran.dg/pr87946.f90 : New test

PR fortran/103389
* gfortran.dg/pr103389.f90 : New test

PR fortran/104429
* gfortran.dg/pr104429.f90 : New test

PR fortran/82774
* gfortran.dg/pr82774.f90 : New test

[Bug target/87496] ICE in aggregate_value_p at gcc/function.c:2046

2022-03-18 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87496

--- Comment #16 from CVS Commits  ---
The releases/gcc-10 branch has been updated by Peter Bergner
:

https://gcc.gnu.org/g:063ef668c716ae0bf9c0f79ae62243e89075b475

commit r10-10504-g063ef668c716ae0bf9c0f79ae62243e89075b475
Author: Peter Bergner 
Date:   Fri Mar 18 14:09:26 2022 -0500

rs6000: Allow -mlong-double-64 after -mabi={ibm,ieee}longdouble [PR104208,
PR87496]

The glibc build is showing a build error due to extra "error" checking from
my
PR87496 fix.  That checking was overeager, disallowing setting the long
double
size to 64-bits if the 128-bit long double ABI had already been specified.
Now we only emit an error if we specify a 128-bit long double ABI if our
long double size is not 128 bits.  This also fixes an erroneous error when
-mabi=ieeelongdouble is used and ISA 2.06 is not enabled, but the long
double
size has been changed to 64 bits.

2022-03-04  Peter Bergner  

gcc/
PR target/87496
PR target/104208
* config/rs6000/rs6000.c (rs6000_option_override_internal): Make
the
ISA 2.06 requirement for -mabi=ieeelongdouble conditional on
-mlong-double-128.
Move the -mabi=ieeelongdouble and -mabi=ibmlongdouble error
checking
from here...
* common/config/rs6000/rs6000-common.c (rs6000_handle_option):
... to here.

gcc/testsuite/
PR target/87496
PR target/104208
* gcc.target/powerpc/pr104208-1.c: New test.
* gcc.target/powerpc/pr104208-2.c: Likewise.
* gcc.target/powerpc/pr87496-2.c: Swap long double options to
trigger
the expected error.
* gcc.target/powerpc/pr87496-3.c: Likewise.

(cherry picked from commit cb16bc3b5f34733ef9bbf8d2e3acacdecb099a62)

[Bug target/87496] ICE in aggregate_value_p at gcc/function.c:2046

2022-03-18 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87496

--- Comment #15 from CVS Commits  ---
The releases/gcc-11 branch has been updated by Peter Bergner
:

https://gcc.gnu.org/g:51a34fdff2af99e2bb096436d6872c8ea434d177

commit r11-9668-g51a34fdff2af99e2bb096436d6872c8ea434d177
Author: Peter Bergner 
Date:   Fri Mar 18 14:08:44 2022 -0500

rs6000: Allow -mlong-double-64 after -mabi={ibm,ieee}longdouble [PR104208,
PR87496]

The glibc build is showing a build error due to extra "error" checking from
my
PR87496 fix.  That checking was overeager, disallowing setting the long
double
size to 64-bits if the 128-bit long double ABI had already been specified.
Now we only emit an error if we specify a 128-bit long double ABI if our
long double size is not 128 bits.  This also fixes an erroneous error when
-mabi=ieeelongdouble is used and ISA 2.06 is not enabled, but the long
double
size has been changed to 64 bits.

2022-03-04  Peter Bergner  

gcc/
PR target/87496
PR target/104208
* config/rs6000/rs6000.c (rs6000_option_override_internal): Make
the
ISA 2.06 requirement for -mabi=ieeelongdouble conditional on
-mlong-double-128.
Move the -mabi=ieeelongdouble and -mabi=ibmlongdouble error
checking
from here...
* common/config/rs6000/rs6000-common.c (rs6000_handle_option):
... to here.

gcc/testsuite/
PR target/87496
PR target/104208
* gcc.target/powerpc/pr104208-1.c: New test.
* gcc.target/powerpc/pr104208-2.c: Likewise.
* gcc.target/powerpc/pr87496-2.c: Swap long double options to
trigger
the expected error.
* gcc.target/powerpc/pr87496-3.c: Likewise.

(cherry picked from commit cb16bc3b5f34733ef9bbf8d2e3acacdecb099a62)

[Bug target/87496] ICE in aggregate_value_p at gcc/function.c:2046

2022-03-04 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87496

--- Comment #14 from CVS Commits  ---
The master branch has been updated by Peter Bergner :

https://gcc.gnu.org/g:cb16bc3b5f34733ef9bbf8d2e3acacdecb099a62

commit r12-7485-gcb16bc3b5f34733ef9bbf8d2e3acacdecb099a62
Author: Peter Bergner 
Date:   Fri Mar 4 09:03:44 2022 -0600

rs6000: Allow -mlong-double-64 after -mabi={ibm,ieee}longdouble [PR104208,
PR87496]

The glibc build is showing a build error due to extra "error" checking from
my
PR87496 fix.  That checking was overeager, disallowing setting the long
double
size to 64-bits if the 128-bit long double ABI had already been specified.
Now we only emit an error if we specify a 128-bit long double ABI if our
long double size is not 128 bits.  This also fixes an erroneous error when
-mabi=ieeelongdouble is used and ISA 2.06 is not enabled, but the long
double
size has been changed to 64 bits.

2022-03-04  Peter Bergner  

gcc/
PR target/87496
PR target/104208
* config/rs6000/rs6000.cc (rs6000_option_override_internal): Make
the
ISA 2.06 requirement for -mabi=ieeelongdouble conditional on
-mlong-double-128.
Move the -mabi=ieeelongdouble and -mabi=ibmlongdouble error
checking
from here...
* common/config/rs6000/rs6000-common.cc (rs6000_handle_option):
... to here.

gcc/testsuite/
PR target/87496
PR target/104208
* gcc.target/powerpc/pr104208-1.c: New test.
* gcc.target/powerpc/pr104208-2.c: Likewise.
* gcc.target/powerpc/pr87496-2.c: Swap long double options to
trigger
the expected error.
* gcc.target/powerpc/pr87496-3.c: Likewise.

[Bug target/87496] ICE in aggregate_value_p at gcc/function.c:2046

2018-12-12 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87496

Peter Bergner  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED

--- Comment #13 from Peter Bergner  ---
Now fixed along with an analogous fix to error out when using
-mabi={ibm,ieee}longdouble and -mlong-double-64 at the same time.  Committed to
trunk and GCC8 and GCC7.

[Bug target/87496] ICE in aggregate_value_p at gcc/function.c:2046

2018-12-12 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87496

--- Comment #12 from Peter Bergner  ---
Author: bergner
Date: Wed Dec 12 17:20:41 2018
New Revision: 267062

URL: https://gcc.gnu.org/viewcvs?rev=267062=gcc=rev
Log:
gcc/
Backport from mainline
2018-12-07  Peter Bergner  

PR target/87496
* config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
-mabi=ieeelongdouble and -mabi=ibmlongdouble without -mlong-double-128.
Do not error for -mabi=ibmlongdouble and no ISA 2.06 support.
* doc/invoke.texi: Document -mabi=ibmlongdouble and
-mabi=ieeelongdouble
require -mlong-double-128.

gcc/testsuite/
Backport from mainline
2018-12-07  Peter Bergner  

PR target/87496
* gcc.target/powerpc/pr87496-1.c: New test.
* gcc.target/powerpc/pr87496-2.c: New test.
* gcc.target/powerpc/pr87496-3.c: New test.

Added:
branches/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/pr87496-1.c
branches/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/pr87496-2.c
branches/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/pr87496-3.c
Modified:
branches/gcc-7-branch/gcc/ChangeLog
branches/gcc-7-branch/gcc/config/rs6000/rs6000.c
branches/gcc-7-branch/gcc/doc/invoke.texi
branches/gcc-7-branch/gcc/testsuite/ChangeLog

[Bug target/87496] ICE in aggregate_value_p at gcc/function.c:2046

2018-12-12 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87496

--- Comment #11 from Peter Bergner  ---
Author: bergner
Date: Wed Dec 12 17:14:13 2018
New Revision: 267061

URL: https://gcc.gnu.org/viewcvs?rev=267061=gcc=rev
Log:
gcc/
Backport from mainline
2018-12-07  Peter Bergner  

PR target/87496
* config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
-mabi=ieeelongdouble and -mabi=ibmlongdouble without -mlong-double-128.
Do not error for -mabi=ibmlongdouble and no ISA 2.06 support.
* doc/invoke.texi: Document -mabi=ibmlongdouble and
-mabi=ieeelongdouble
require -mlong-double-128.

gcc/testsuite/
Backport from mainline
2018-12-07  Peter Bergner  

PR target/87496
* gcc.target/powerpc/pr87496.c: Rename from this...
* gcc.target/powerpc/pr87496-1.c: ...to this.  Update comment.
* gcc.target/powerpc/pr87496-2.c: New test.
* gcc.target/powerpc/pr87496-3.c: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/gcc.target/powerpc/pr87496-1.c
  - copied, changed from r267060,
branches/gcc-8-branch/gcc/testsuite/gcc.target/powerpc/pr87496.c
branches/gcc-8-branch/gcc/testsuite/gcc.target/powerpc/pr87496-2.c
branches/gcc-8-branch/gcc/testsuite/gcc.target/powerpc/pr87496-3.c
Removed:
branches/gcc-8-branch/gcc/testsuite/gcc.target/powerpc/pr87496.c
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/config/rs6000/rs6000.c
branches/gcc-8-branch/gcc/doc/invoke.texi
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug target/87496] ICE in aggregate_value_p at gcc/function.c:2046

2018-12-07 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87496

--- Comment #10 from Peter Bergner  ---
Author: bergner
Date: Fri Dec  7 17:33:55 2018
New Revision: 266899

URL: https://gcc.gnu.org/viewcvs?rev=266899=gcc=rev
Log:
gcc/
PR target/87496
* config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
-mabi=ieeelongdouble and -mabi=ibmlongdouble without -mlong-double-128.
Do not error for -mabi=ibmlongdouble and no ISA 2.06 support.
* doc/invoke.texi: Document -mabi=ibmlongdouble and
-mabi=ieeelongdouble
require -mlong-double-128.

gcc/testsuite/
PR target/87496
* gcc.target/powerpc/pr87496.c: Rename from this...
* gcc.target/powerpc/pr87496-1.c: ...to this.  Update comment.
* gcc.target/powerpc/pr87496-2.c: New test.
* gcc.target/powerpc/pr87496-3.c: New test.

Added:
trunk/gcc/testsuite/gcc.target/powerpc/pr87496-1.c
  - copied, changed from r266898,
trunk/gcc/testsuite/gcc.target/powerpc/pr87496.c
trunk/gcc/testsuite/gcc.target/powerpc/pr87496-2.c
trunk/gcc/testsuite/gcc.target/powerpc/pr87496-3.c
Removed:
trunk/gcc/testsuite/gcc.target/powerpc/pr87496.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/rs6000/rs6000.c
trunk/gcc/doc/invoke.texi
trunk/gcc/testsuite/ChangeLog

[Bug target/87496] ICE in aggregate_value_p at gcc/function.c:2046

2018-12-04 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87496

Peter Bergner  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
URL|https://gcc.gnu.org/ml/gcc- |https://gcc.gnu.org/ml/gcc-
   |patches/2018-11/msg02367.ht |patches/2018-12/msg00228.ht
   |ml  |ml
 Resolution|FIXED   |---

--- Comment #9 from Peter Bergner  ---
Reopening, since there was a slight bug in the committed fix, in that we
accidentally disallowed -mabi=ibmlongdouble from being used without full ISA
2.06 support, which is wrong.  I have an updated patch submitted.

[Bug target/87496] ICE in aggregate_value_p at gcc/function.c:2046

2018-11-30 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87496

--- Comment #8 from Peter Bergner  ---
Author: bergner
Date: Fri Nov 30 18:57:33 2018
New Revision: 266680

URL: https://gcc.gnu.org/viewcvs?rev=266680=gcc=rev
Log:
gcc/testsuite/
PR target/87496
* gcc.target/powerpc/pr86324-1.c: Add dg-skip-if selector.
Add -mcpu=power7 option.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.target/powerpc/pr86324-1.c

[Bug target/87496] ICE in aggregate_value_p at gcc/function.c:2046

2018-11-29 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87496

--- Comment #7 from Peter Bergner  ---
Author: bergner
Date: Thu Nov 29 22:02:36 2018
New Revision: 266647

URL: https://gcc.gnu.org/viewcvs?rev=266647=gcc=rev
Log:
gcc/
Backport from mainline
2018-11-29  Peter Bergner  

PR target/87496
* config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
-mabi=ieeelongdouble without both -mpopcntd and -mvsx.

gcc/testsuite/
Backport from mainline
2018-11-29  Peter Bergner  

PR target/87496
* gcc.target/powerpc/pr87496.c: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/gcc.target/powerpc/pr87496.c
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/config/rs6000/rs6000.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug target/87496] ICE in aggregate_value_p at gcc/function.c:2046

2018-11-29 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87496

Peter Bergner  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Peter Bergner  ---
Fixed on trunk.  I will look at whether backports are needed.  It looks like
yes for GCC8.

[Bug target/87496] ICE in aggregate_value_p at gcc/function.c:2046

2018-11-29 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87496

--- Comment #5 from Peter Bergner  ---
Author: bergner
Date: Thu Nov 29 19:25:47 2018
New Revision: 266636

URL: https://gcc.gnu.org/viewcvs?rev=266636=gcc=rev
Log:
gcc/
PR target/87496
* config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
-mabi=ieeelongdouble without both -mpopcntd and -mvsx.

gcc/testsuite/
PR target/87496
* gcc.target/powerpc/pr87496.c: New test.

Added:
trunk/gcc/testsuite/gcc.target/powerpc/pr87496.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/rs6000/rs6000.c
trunk/gcc/testsuite/ChangeLog

[Bug target/87496] ICE in aggregate_value_p at gcc/function.c:2046

2018-11-28 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87496

Peter Bergner  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |bergner at gcc dot 
gnu.org
   Target Milestone|--- |9.0

--- Comment #4 from Peter Bergner  ---
Ok, so the fix is to not allow -mabi=ieeelongdouble without -mvsx & -mpopcntd. 
I'll prepare a patch to do that.

[Bug target/87496] ICE in aggregate_value_p at gcc/function.c:2046

2018-11-28 Thread meissner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87496

--- Comment #3 from Michael Meissner  ---
We should not allow -mabi=ieeelongdouble if we do not have the full ISA 2.06
(power7) instruction set (i.e. both -mpopcntd and -mvsx should be set).  It was
probably an oversight that I only checked for -mvsx.

[Bug target/87496] ICE in aggregate_value_p at gcc/function.c:2046

2018-11-28 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87496

Peter Bergner  changed:

   What|Removed |Added

 CC||bergner at gcc dot gnu.org,
   ||meissner at gcc dot gnu.org

--- Comment #2 from Peter Bergner  ---
Here's a much smaller C test case.  It seems we try and convert the SFmode var
into a KFmode var before converting it to an integer?!?!

Mike, does this look familiar to you?  Should KFmode even be supported if we've
disabled popcntd?

bergner@pike:~/gcc/BUGS/PR87496$ cat pr87496.c 
unsigned long
foo (float f)
{
  return f;
}
bergner@pike:~/gcc/BUGS/PR87496$
/home/bergner/gcc/build/gcc-fsf-mainline-pr87496-debug/gcc/xgcc
-B/home/bergner/gcc/build/gcc-fsf-mainline-pr87496-debug/gcc -O2 -S
-mabi=ieeelongdouble -mno-popcntd pr87496.c 
cc1: warning: Using IEEE extended precision long double [-Wpsabi]
during RTL pass: expand
pr87496.c: In function ‘foo’:
pr87496.c:4:10: internal compiler error: Segmentation fault
4 |   return f;
  |  ^
0x1110517b crash_signal
/home/bergner/gcc/gcc-fsf-mainline-pr87496/gcc/toplev.c:326
0x109e52f0 aggregate_value_p(tree_node const*, tree_node const*)
/home/bergner/gcc/gcc-fsf-mainline-pr87496/gcc/function.c:2091
0x10652fa3 emit_library_call_value_1(int, rtx_def*, rtx_def*, libcall_type,
machine_mode, int, std::pair*)
/home/bergner/gcc/gcc-fsf-mainline-pr87496/gcc/calls.c:4747
0x108d894b emit_library_call_value(rtx_def*, rtx_def*, libcall_type,
machine_mode, rtx_def*, machine_mode)
/home/bergner/gcc/gcc-fsf-mainline-pr87496/gcc/rtl.h:4201
0x117edc13 rs6000_expand_float128_convert(rtx_def*, rtx_def*, bool)
   
/home/bergner/gcc/gcc-fsf-mainline-pr87496/gcc/config/rs6000/rs6000.c:21918

[Bug target/87496] ICE in aggregate_value_p at gcc/function.c:2046

2018-10-03 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87496

Segher Boessenkool  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1

--- Comment #1 from Segher Boessenkool  ---
Needs -mcpu=power7 (or power8, but not power9) -mno-popcntd -m64.  Confirmed.