[Bug ada/100559] New: Solaris SPARC GCC 11.1 Ada build: i-cexten.ads:278:28: modulus exceeds limit (2 ** 64)

2021-05-12 Thread sumbera at volny dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100559

Bug ID: 100559
   Summary: Solaris SPARC GCC 11.1 Ada build: i-cexten.ads:278:28:
modulus exceeds limit (2 ** 64)
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ada
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sumbera at volny dot cz
  Target Milestone: ---

Solaris SPARC GCC 11.1 build with Ada fails:

$ pwd
/builds/psumbera/userland-gcc-11.1/components/gcc10/build/sparcv9/gcc/ada/rts_32
$ /builds/psumbera/userland-gcc-11.1/components/gcc10/build/sparcv9/./gcc/xgcc
-B/builds/psumbera/userland-gcc-11.1/components/gcc10/build/sparcv9/./gcc/
-B/usr/gcc/11/sparcv9-sun-solaris2.11/bin/
-B/usr/gcc/11/sparcv9-sun-solaris2.11/lib/ -isystem
/usr/gcc/11/sparcv9-sun-solaris2.11/include -isystem
/usr/gcc/11/sparcv9-sun-solaris2.11/sys-include   -fchecking=1 -c -g -O2 -m32
-fPIC  -W -Wall -gnatpg -nostdinc -m32  g-calend.adb -o g-calend.o | less
i-cexten.ads:278:28: modulus exceeds limit (2 ** 64)
i-cexten.ads:281:28: modulus exceeds limit (2 ** 64)
...
i-cexten.ads:659:22: integer type definition bounds out of range
i-cexten.ads:662:22: integer type definition bounds out of range
i-cexten.ads:665:22: integer type definition bounds out of range
..


vi i-cexten.ads:

278   type Unsigned_65 is mod 2 ** 65;
279   for Unsigned_65'Size use 65;
..
659   type Signed_65 is range -2 ** 64 .. 2 ** 64 - 1;
660   for Signed_65'Size use 65;

--

GCC 10.3 builds with Ada without problems.
GCC 11.1 on intel builds with Ada without problems.

[Bug c/100547] ICE with "-g -O1": stack overflow in expand with a very large vector_size attribute

2021-05-12 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100547

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2021-05-12
   Keywords||accepts-invalid
 Ever confirmed|0   |1
  Component|middle-end  |c

--- Comment #1 from Richard Biener  ---
The issue is that VECTOR_CST_NELTS does not fit 32bits but RTX vectors have int
sizes.

I suggest to limit the vector_size attribute argument accordingly.

Also a better failure mode might be to make the rtvec_alloc size argument
size_t and ICE on a size that doesn't fit an int rather than silently
truncating.

[Bug fortran/100551] [11/12 Regression] Passing return value of intrinsic to class(*) dummy argument can cause segfaults

2021-05-12 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100551

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |11.2
   Priority|P3  |P4

[Bug bootstrap/100552] [11/12 Regression] configure: 32208: Syntax error: Bad substitution

2021-05-12 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100552

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |11.2
   Keywords||build
Summary|[11 Regression] configure:  |[11/12 Regression]
   |32208: Syntax error: Bad|configure: 32208: Syntax
   |substitution|error: Bad substitution
 CC||mhillen at linux dot ibm.com

[Bug rtl-optimization/100554] [9/10/11/12 Regression] -fcompare-debug failure w/ -Os -fmodulo-sched -fno-tree-loop-optimize

2021-05-12 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100554

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |9.4

[Bug c/100547] ICE with "-g -O1": stack overflow in expand with a very large vector_size attribute

2021-05-12 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100547

Richard Biener  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
 Status|NEW |ASSIGNED

--- Comment #2 from Richard Biener  ---
Testing patch.

[Bug ada/100559] Solaris SPARC GCC 11.1 Ada build: i-cexten.ads:278:28: modulus exceeds limit (2 ** 64)

2021-05-12 Thread sumbera at volny dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100559

Petr Sumbera  changed:

   What|Removed |Added

Version|11.1.0  |unknown
 Target|sparc-solaris   |

--- Comment #1 from Petr Sumbera  ---
I think it's related to:

[Ada] Clean up in Interfaces.C.Extensions 

https://github.com/gcc-mirror/gcc/commit/eafbde5131d2926fdc48b1c663d03865c9a37302

[Bug tree-optimization/94589] Optimize (i<=>0)>0 to i>0

2021-05-12 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94589

--- Comment #21 from CVS Commits  ---
The master branch has been updated by Jakub Jelinek :

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

commit r12-733-gf5f1838435400b837c8677c53a611e2dc6d56442
Author: Jakub Jelinek 
Date:   Wed May 12 09:46:03 2021 +0200

match.pd: Optimize (x & y) == x into (x & ~y) == 0 [PR94589]

> Somewhere in RTL (_M_value&1)==_M_value is turned into (_M_value&-2)==0,
> that could be worth doing already in GIMPLE.

Apparently it is
  /* Simplify eq/ne (and/ior x y) x/y) for targets with a BICS instruction
or
 constant folding if x/y is a constant.  */
  if ((code == EQ || code == NE)
  && (op0code == AND || op0code == IOR)
  && !side_effects_p (op1)
  && op1 != CONST0_RTX (cmp_mode))
{
  /* Both (eq/ne (and x y) x) and (eq/ne (ior x y) y) simplify to
 (eq/ne (and (not y) x) 0).  */
...
  /* Both (eq/ne (and x y) y) and (eq/ne (ior x y) x) simplify to
 (eq/ne (and (not x) y) 0).  */
Yes, doing that on GIMPLE for the case where the not argument is constant
would simplify the phiopt follow-up (it would be single imm use then).

On Thu, May 06, 2021 at 09:42:41PM +0200, Marc Glisse wrote:
> We can probably do it in 2 steps, first something like
>
> (for cmp (eq ne)
>  (simplify
>   (cmp (bit_and:c @0 @1) @0)
>   (cmp (@0 (bit_not! @1)) { build_zero_cst (TREE_TYPE (@0)); })))
>
> to get rid of the double use, and then simplify X&C==0 to X<=~C if C is a
> mask 111...000 (I thought we already had a function to detect such masks,
or
> the 000...111, but I can't find them anymore).

Ok, here is the first step then.

2021-05-12  Jakub Jelinek  
Marc Glisse  

PR tree-optimization/94589
* match.pd ((X & Y) == X -> (X & ~Y) == 0,
(X | Y) == Y -> (X & ~Y) == 0): New GIMPLE simplifications.

* gcc.dg/tree-ssa/pr94589-1.c: New test.

[Bug fortran/100555] [OPENMP] ICE in target parallel construct with if-clause

2021-05-12 Thread xiao.liu--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100555

--- Comment #1 from xiao@compiler-dev.com  ---
Additionally, "implicit none" will lead errors if exists
directive-name-modifier in if-clause.

module m
  integer, save :: n = 4
end module

program test
  use m
  use omp_lib
  implicit none
  integer :: i
!$omp target parallel do if(target: n > 2) if(parallel: n > 2)
  do i=1,n
print *, "thread id = ", omp_get_thread_num()
  end do
!$omp end target parallel do
end program

The error is,

test.f90:10:54:

   10 | !$omp target parallel do if(target: n > 2) if(parallel: n > 2)
  |  1
Error: Symbol ‘parallel’ at (1) has no IMPLICIT type; did you mean
‘omp_in_parallel’?

test.f90:10:34:

   10 | !$omp target parallel do if(target: n > 2) if(parallel: n > 2)
  |  1
Error: Symbol ‘target’ at (1) has no IMPLICIT type

[Bug tree-optimization/100089] [11/12 Regression] 30% performance regression for denbench/mp2decoddata2 with -O3

2021-05-12 Thread rsandifo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100089

--- Comment #3 from rsandifo at gcc dot gnu.org  
---
Is this really a costing issue, or should we instead reject the
BB fallback if it leaves any scalar COND_EXPRs around?  This would
be similar to the way that we reject IFN_MASK_LOAD/STORE calls,
except that the COND_EXPR tests would only apply to unvectorised
statements and so would need to be tested after SLP discovery
rather than before it.  (Ideally IFN_MASK_LOAD/STORE would work
like that too.)

[Bug tree-optimization/100089] [11/12 Regression] 30% performance regression for denbench/mp2decoddata2 with -O3

2021-05-12 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100089

--- Comment #4 from Richard Biener  ---
(In reply to rsand...@gcc.gnu.org from comment #3)
> Is this really a costing issue, or should we instead reject the
> BB fallback if it leaves any scalar COND_EXPRs around?  This would
> be similar to the way that we reject IFN_MASK_LOAD/STORE calls,
> except that the COND_EXPR tests would only apply to unvectorised
> statements and so would need to be tested after SLP discovery
> rather than before it.  (Ideally IFN_MASK_LOAD/STORE would work
> like that too.)

I suppose we could do that, but then I'm not sure how exactly we'd do it ;)

Good idea anyway.

[Bug middle-end/100508] ICE with '-g -O3': in expand_debug_locations, at cfgexpand.c:5618

2021-05-12 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100508

--- Comment #5 from CVS Commits  ---
The master branch has been updated by Jakub Jelinek :

https://gcc.gnu.org/g:19040050aa2c8ee890fc58dda48639fc91bf0af0

commit r12-736-g19040050aa2c8ee890fc58dda48639fc91bf0af0
Author: Jakub Jelinek 
Date:   Wed May 12 10:38:35 2021 +0200

expand: Don't reuse DEBUG_EXPRs with vector type if they have different
modes [PR100508]

The inliner doesn't remap DEBUG_EXPR_DECLs, so the same decls can appear
in multiple functions.
Furthermore, expansion reuses corresponding DEBUG_EXPRs too, so they again
can be reused in multiple functions.
Neither of that is a major problem, DEBUG_EXPRs are just magic value
holders
and what value they stand for is independent in each function and driven by
what debug stmts or DEBUG_INSNs they are bound to.
Except for DEBUG_EXPR*s with vector types, TYPE_MODE can be either BLKmode
or some vector mode depending on whether current function's enabled ISAs
support that vector mode or not.  On the following testcase, we expand it
first in foo function without AVX2 enabled and so the DEBUG_EXPR is
BLKmode, but later the same DEBUG_EXPR_DECL is used in a simd clone with
AVX2 enabled and expansion ICEs because of a mode mismatch.

The following patch fixes that by forcing recreation of a DEBUG_EXPR if
there is a mode mismatch for vector typed DEBUG_EXPR_DECL, DEBUG_EXPRs
will be still reused in between functions otherwise and within the same
function the mode should be always the same.

2021-05-12  Jakub Jelinek  

PR middle-end/100508
* cfgexpand.c (expand_debug_expr): For DEBUG_EXPR_DECL with vector
type, don't reuse DECL_RTL if it has different mode, instead force
creation of a new DEBUG_EXPR.

* gcc.dg/gomp/pr100508.c: New test.

[Bug bootstrap/100560] New: [13 regression] build/gengtype-state.o fails with clang 10.0.1: cannot specify -o when generating multiple output files

2021-05-12 Thread gerald at pfeifer dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100560

Bug ID: 100560
   Summary: [13 regression] build/gengtype-state.o fails with
clang 10.0.1: cannot specify -o when generating
multiple output files
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
  Assignee: unassigned at gcc dot gnu.org
  Reporter: gerald at pfeifer dot com
CC: marxin at gcc dot gnu.org
  Target Milestone: ---

This started between May 9th 15:40 UTC and May 10th 15:40 UTC.

c++ -std=c++11   -g -DIN_GCC-fno-strict-aliasing -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings-Wcast-qual
-Wno-error=format-diag -Wno-format -Wmissing-format-attribute
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H  -DGENERATOR_FILE -fno-PIE
-no-pie -o build/gengtype \
build/gengtype.o build/errors.o build/gengtype-lex.o build/gengtype-parse.o
build/gengtype-state.o version.h
../build-i586-unknown-freebsd11.4/libiberty/libiberty.a
c++: warning: treating 'c-header' input as 'c++-header' when in C++ mode, this
 behavior is deprecated [-Wdeprecated]
c++: error: cannot specify -o when generating multiple output files
gmake[3]: *** [Makefile:2989: build/gengtype] Error 1
gmake[3]: Leaving directory '/scratch/tmp/gerald/OBJ-0511-2228/gcc'
gmake[2]: *** [Makefile:4759: all-stage1-gcc] Error 2
gmake[2]: Leaving directory '/scratch/tmp/gerald/OBJ-0511-2228'
gmake[1]: *** [Makefile:25415: stage1-bubble] Error 2
gmake[1]: Leaving directory '/scratch/tmp/gerald/OBJ-0511-2228'


% c++ --version
FreeBSD clang version 10.0.1 (g...@github.com:llvm/llvm-project.git
llvmorg-10.0.1-0-gef32c611aa2)
Target: i386-unknown-freebsd11.4


Martin, I saw you made a small change around gengtype that day,
alas don't see how that might have triggered this? Any idea?

[Bug c/100547] ICE with "-g -O1": stack overflow in expand with a very large vector_size attribute

2021-05-12 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100547

--- Comment #3 from CVS Commits  ---
The master branch has been updated by Richard Biener :

https://gcc.gnu.org/g:229a6dbd9ef1680f1ca02d6ce63e8abdffaaeeba

commit r12-737-g229a6dbd9ef1680f1ca02d6ce63e8abdffaaeeba
Author: Richard Biener 
Date:   Wed May 12 09:07:42 2021 +0200

middle-end/100547 - check rtvec_alloc size

This makes the rtvec_alloc argument size_t catching overflow and
truncated arguments (from "invalid" testcases), verifying the
argument against INT_MAX which is the limit set by the int
typed rtvec_def.num_elem member.

2021-05-12  Richard Biener  

PR middle-end/100547
* rtl.h (rtvec_alloc): Make argument size_t.
* rtl.c (rtvec_alloc): Verify the count is less than INT_MAX.

[Bug bootstrap/100560] [12 regression] build/gengtype-state.o fails with clang 10.0.1: cannot specify -o when generating multiple output files

2021-05-12 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100560

--- Comment #1 from CVS Commits  ---
The master branch has been updated by Martin Liska :

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

commit r12-739-gdd39327854de1d18110fada5f8a7a4630da6d144
Author: Martin Liska 
Date:   Wed May 12 10:51:21 2021 +0200

Remove version.h from object files

gcc/ChangeLog:

PR bootstrap/100560
* Makefile.in: Remove version.h from linker command line.

[Bug bootstrap/100560] [12 regression] build/gengtype-state.o fails with clang 10.0.1: cannot specify -o when generating multiple output files

2021-05-12 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100560

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #2 from Martin Liška  ---
Sorry for the breakage, stupid error.
Should be fixed now.

[Bug fortran/100561] New: Error while computing square of a real number (8 and 16 bytes)

2021-05-12 Thread h0bb_88 at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100561

Bug ID: 100561
   Summary: Error while computing square of a real number (8 and
16 bytes)
   Product: gcc
   Version: og10 (devel/omp/gcc-10)
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: h0bb_88 at protonmail dot com
  Target Milestone: ---

This simple example didn't give the same result than wolfram or any calculator
:
- result from program : 9.869604950...
- result from other calculators : 9.869604401...

The rounding is not the cause, because of error from 10° decimal, in 16-byte
floating point. This error exist too in 8-byte floating-points number. 

Simple example :

program main
real(16), parameter :: pi =
3.1415926535897932384626433832795028841971693993751058209749445923
write(*,*) pi**2, pi*pi
end program

[Bug debug/100515] [12 Regression] ICE in output_rnglists, at dwarf2out.c:12294 since r12-574-ge69ac0203725fb8d

2021-05-12 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100515

--- Comment #5 from CVS Commits  ---
The master branch has been updated by Bernd Edlinger :

https://gcc.gnu.org/g:1ecd1e6c894fbdbc10fdcfee419922b24e1115ee

commit r12-740-g1ecd1e6c894fbdbc10fdcfee419922b24e1115ee
Author: Bernd Edlinger 
Date:   Tue May 11 17:55:18 2021 +0200

Fix ICE in output_rnglists, at dwarf2out.c:12294

In this testcase the compile unit consists of a single
text section with a single embedded DECL_IGNORED_P function.
So we have a kind of multi-range text section here.
To avoid an ICE in output_rnglists we need to make sure
that have_multiple_function_sections is set to true.
This is a regression from
e69ac020372 ("Add line debug info for virtual thunks")

2021-05-12  Bernd Edlinger  

PR debug/100515
* dwarf2out.c (dwarf2out_finish): Set
have_multiple_function_sections with multi-range text_section.

* gcc.dg/debug/dwarf2/pr100515.c: New testcase.

[Bug middle-end/100562] New: ICE after commit a076632e274abe344ca7648b7c7f299273d4cbe0

2021-05-12 Thread stefansf at linux dot ibm.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100562

Bug ID: 100562
   Summary: ICE after commit
a076632e274abe344ca7648b7c7f299273d4cbe0
   Product: gcc
   Version: 12.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: stefansf at linux dot ibm.com
  Target Milestone: ---
Target: s390*-*-*

Since commit g:a076632e274abe344ca7648b7c7f299273d4cbe0 building GCC with Go
language enabled on IBM Z results in

In function 'syscall.forkExec':
go1: error: address taken, but ADDRESSABLE bit not set
PHI argument
&go..C479;
for PHI node
err$__object_78 = PHI 
during GIMPLE pass: fre
go1: internal compiler error: verify_ssa failed
0x27e3349 verify_ssa(bool, bool)
/home/stefansf/devel/gcc-3/src/gcc/tree-ssa.c:1214
0x21fee6f execute_function_todo
/home/stefansf/devel/gcc-3/src/gcc/passes.c:2049
0x21fda15 do_per_function
/home/stefansf/devel/gcc-3/src/gcc/passes.c:1687
0x21ff0a5 execute_todo
/home/stefansf/devel/gcc-3/src/gcc/passes.c:2096
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug fortran/100561] Error while computing square of a real number (8 and 16 bytes)

2021-05-12 Thread h0bb_88 at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100561

--- Comment #1 from h0bb_88 at protonmail dot com ---
Created attachment 50797
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50797&action=edit
Source code

[Bug fortran/100561] Error while computing square of a real number (8 and 16 bytes)

2021-05-12 Thread h0bb_88 at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100561

--- Comment #2 from h0bb_88 at protonmail dot com ---
Created attachment 50798
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50798&action=edit
Comparison between f90 result and bc computation

[Bug debug/100515] [12 Regression] ICE in output_rnglists, at dwarf2out.c:12294 since r12-574-ge69ac0203725fb8d

2021-05-12 Thread edlinger at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100515

Bernd Edlinger  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #6 from Bernd Edlinger  ---
The ICE should be fixed now.

[Bug fortran/100561] Error while computing square of a real number (8 and 16 bytes)

2021-05-12 Thread h0bb_88 at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100561

--- Comment #3 from h0bb_88 at protonmail dot com ---
System:Kernel: 5.8.0-53-generic x86_64 bits: 64 compiler: N/A Desktop:
Cinnamon 4.8.6 
   wm: muffin dm: LightDM Distro: Linux Mint 20.1 Ulyssa base: Ubuntu
20.04 focal 
Machine:   Type: Desktop Mobo: ASUSTeK model: Z170-K v: Rev X.0x serial:
 
   UEFI [Legacy]: American Megatrends v: 3805 date: 05/16/2018 
CPU:   Topology: Quad Core model: Intel Core i7-6700K bits: 64 type: MT MCP
arch: Skylake-S 
   rev: 3 L2 cache: 8192 KiB 
   flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
bogomips: 63999 
   Speed: 3900 MHz min/max: 800/4200 MHz Core speeds (MHz): 1: 3900 2:
3900 3: 3900 
   4: 3900 5: 3900 6: 3900 7: 3900 8: 3900

[Bug go/100537] Bootstrap-O3 and bootstrap-debug fail on 32-bit ARM after gcc-12-657-ga076632e274a

2021-05-12 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100537

--- Comment #5 from Jiu Fu Guo  ---
breakpoint at tree-ssa.c:1013 error ("address taken, but ADDRESSABLE bit not
set"); 

if ((VAR_P (base)
 || TREE_CODE (base) == PARM_DECL
 || TREE_CODE (base) == RESULT_DECL)
&& !TREE_ADDRESSABLE (base))
  {
B   error ("address taken, but ADDRESSABLE bit not set");
err = true;
  }

we can see base:
p base
$1 = 

And break at ggc_internal_alloc, b ggc-page.c:1455 if result ==  0x20a285e0
we can see the stack:
Unary_expression::do_get_backend
(expressions.cc:5322)->Gcc_backend::implicit_variable(go-gcc.cc:29239) ->
build_decl->make_node ->...-> ggc_internal_cleared_alloc

Gcc_backend::implicit_variable:
  tree decl = build_decl(BUILTINS_LOCATION, VAR_DECL, ...

Unary_expression::do_get_backend (expressions.cc:5322):
  gogo->backend()->implicit_variable(var_name, "", btype, true, true, false,
0);
where var_name is go..C479


And break at build_fold_addr_expr_loc if t == 0x20a285e0
Gcc_backend::address_expression (go-gcc:1683) --> build_fold_addr_expr_loc

[Bug middle-end/100477] Bogus -Wstringop-overflow warning on memset

2021-05-12 Thread andysem at mail dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100477

--- Comment #9 from andysem at mail dot ru ---
(In reply to Martin Sebor from comment #8)
> 
> Submitting a bug for the LTO problem is only helpful if it comes with a test
> case to reproduce it.  I have heard about problems suppressing warnings in
> LTO builds but I'm not aware of it being a design limitation, and other than
> the mention of the inlining caveat (the -Wstringop-overflow example) I can't
> find it mentioned in the LTO section of the manual pointed to by the link.

The warning is very likely appearing as a result of inlining, and since the
compiler inlines based on its own decisions it is difficult to create a test
case that would reproduce the problem.

The bottom line is that diagnostic pragmas don't work (reliably) with LTO, and
fixing that requires the compiler to track pragmas past inlining.

[Bug debug/100515] [12 Regression] ICE in output_rnglists, at dwarf2out.c:12294 since r12-574-ge69ac0203725fb8d

2021-05-12 Thread edlinger at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100515

--- Comment #7 from Bernd Edlinger  ---
Okay, while the ICE is fixed, there is something odd in the test case:

foo._omp_fn.0:
.LVL0:
.LFB2:
.cfi_startproc
.file 1 "pr100515.c"
.loc 1 10 5 view -0
ret
.cfi_endproc
.LFE2:
.size   foo._omp_fn.0, .-foo._omp_fn.0
.p2align 4
.type   bar._omp_fn.0, @function
bar._omp_fn.0:
.LFB5:
.cfi_startproc
ret
.cfi_endproc
.LFE5:
.size   bar._omp_fn.0, .-bar._omp_fn.0
.p2align 4
.globl  foo
.type   foo, @function

foo._omp_fn.0 does have a correct .loc statement,
while bar._omp_fn.0 does not have a .loc statement
and therefore no debugging in bar is possible.
This must be a pre-existing issue already there before
r12-574-ge69ac0203725fb8d.

[Bug target/100563] New: [10/11/12 Regression] arm: ICE in arm_gen_dicompare_reg, at config/arm/arm.c:15976

2021-05-12 Thread acoplan at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100563

Bug ID: 100563
   Summary: [10/11/12 Regression] arm: ICE in
arm_gen_dicompare_reg, at config/arm/arm.c:15976
   Product: gcc
   Version: 12.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: acoplan at gcc dot gnu.org
  Target Milestone: ---

The following fails:

$ gcc/xgcc -v
Using built-in specs.
COLLECT_GCC=gcc/xgcc
Target: arm-eabi
Configured with: /home/alecop01/toolchain/src/gcc/configure
--prefix=/data_sdb/toolchain/cc1s/arm --enable-languages=c,c++
--disable-bootstrap --target=arm-eabi
Thread model: single
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20210511 (experimental) (GCC)

$ cat test.c
unsigned long long e(void);
void f(int);
void a() {
  short b = -1, c = (int)&b;
  unsigned long long d = e();
  f(b >= d);
}

$ gcc/xgcc -B gcc -c test.c -Og
during RTL pass: expand
test.c: In function ‘a’:
test.c:6:3: internal compiler error: in arm_gen_dicompare_reg, at
config/arm/arm.c:15976
6 |   f(b >= d);
  |   ^
0x112525f arm_gen_dicompare_reg
/home/alecop01/toolchain/src/gcc/gcc/config/arm/arm.c:15976
0x112525f arm_gen_compare_reg(rtx_code, rtx_def*, rtx_def*, rtx_def*)
/home/alecop01/toolchain/src/gcc/gcc/config/arm/arm.c:16189
0x151ab0a gen_cstore_cc(rtx_def*, rtx_def*, rtx_def*, rtx_def*)
/home/alecop01/toolchain/src/gcc/gcc/config/arm/arm.md:7973
0x151aded gen_cstorehf4(rtx_def*, rtx_def*, rtx_def*, rtx_def*)
/home/alecop01/toolchain/src/gcc/gcc/config/arm/arm.md:8192
0xbe5b98 maybe_expand_insn(insn_code, unsigned int, expand_operand*)
/home/alecop01/toolchain/src/gcc/gcc/optabs.c:7813
0x921e51 emit_cstore(rtx_def*, insn_code, rtx_code, machine_mode, machine_mode,
int, rtx_def*, rtx_def*, int, machine_mode)
/home/alecop01/toolchain/src/gcc/gcc/expmed.c:5506
0x922780 emit_store_flag_1
/home/alecop01/toolchain/src/gcc/gcc/expmed.c:5755
0x922cf1 emit_store_flag(rtx_def*, rtx_code, rtx_def*, rtx_def*, machine_mode,
int, int)
/home/alecop01/toolchain/src/gcc/gcc/expmed.c:6015
0x9238f8 emit_store_flag_force(rtx_def*, rtx_code, rtx_def*, rtx_def*,
machine_mode, int, int)
/home/alecop01/toolchain/src/gcc/gcc/expmed.c:6155
0x932be0 do_store_flag
/home/alecop01/toolchain/src/gcc/gcc/expr.c:12655
0x9336b8 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
/home/alecop01/toolchain/src/gcc/gcc/expr.c:9838
0x93b59c expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
/home/alecop01/toolchain/src/gcc/gcc/expr.c:10386
0x933807 expand_expr
/home/alecop01/toolchain/src/gcc/gcc/expr.h:301
0x933807 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
/home/alecop01/toolchain/src/gcc/gcc/expr.c:8954
0x93b59c expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
/home/alecop01/toolchain/src/gcc/gcc/expr.c:10386
0x7d71a9 expand_normal
/home/alecop01/toolchain/src/gcc/gcc/expr.h:307
0x7d71a9 precompute_register_parameters
/home/alecop01/toolchain/src/gcc/gcc/calls.c:988
0x7d71a9 expand_call(tree_node*, rtx_def*, int)
/home/alecop01/toolchain/src/gcc/gcc/calls.c:4450
0x939c5b expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
/home/alecop01/toolchain/src/gcc/gcc/expr.c:11408
0x7f27b3 expand_expr
/home/alecop01/toolchain/src/gcc/gcc/expr.h:301
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

The issue occurs for a wide variety of -march options, including -march=armv8-a
and -march=armv8.1-m.main.

[Bug go/100537] Bootstrap-O3 and bootstrap-debug fail on 32-bit ARM after gcc-12-657-ga076632e274a

2021-05-12 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100537

--- Comment #6 from Jiu Fu Guo  ---
As Richard mentioned: one does mark the object addressable.
Which is for 'label' (Gcc_backend::label_address).

I'm wondering if all others invoking on build_fold_addr_expr_loc need to mark
addressable?

[Bug c/100521] [12 Regression] ICE at -O2 and above: in verify_range, at value-range.cc:384 since r12-127-g694c956b6b877e48

2021-05-12 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100521

Martin Liška  changed:

   What|Removed |Added

 Ever confirmed|0   |1
Summary|ICE at -O2 and above: in|[12 Regression] ICE at -O2
   |verify_range, at|and above: in verify_range,
   |value-range.cc:384  |at value-range.cc:384 since
   ||r12-127-g694c956b6b877e48
 CC||marxin at gcc dot gnu.org
   Last reconfirmed||2021-05-12
 Status|UNCONFIRMED |NEW

--- Comment #1 from Martin Liška  ---
Started with r12-127-g694c956b6b877e48.

[Bug ipa/100529] [11/12 Regression] ICE at -O3: in force_constant_size, at gimplify.c:733 since r11-4494-ga4223abb3deb24e8

2021-05-12 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100529

Martin Liška  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Last reconfirmed||2021-05-12
 CC||jsm28 at gcc dot gnu.org
 Status|UNCONFIRMED |NEW
Summary|ICE at -O3: in  |[11/12 Regression] ICE at
   |force_constant_size, at |-O3: in
   |gimplify.c:733  |force_constant_size, at
   ||gimplify.c:733 since
   ||r11-4494-ga4223abb3deb24e8

--- Comment #2 from Martin Liška  ---
Likely started with r11-4494-ga4223abb3deb24e8.

[Bug target/100530] [8/9/10/11/12 Regression] ICE with -g: in add_dwarf_attr with __seg_gs (Alternative address-space) global variable since r8-4385-ga297ccb52e0c894e

2021-05-12 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100530

Martin Liška  changed:

   What|Removed |Added

Summary|ICE with -g: in |[8/9/10/11/12 Regression]
   |add_dwarf_attr with |ICE with -g: in
   |__seg_gs (Alternative   |add_dwarf_attr with
   |address-space) global   |__seg_gs (Alternative
   |variable|address-space) global
   ||variable since
   ||r8-4385-ga297ccb52e0c894e
 CC||dbowman at caspiannetworks dot 
com
   ||, marxin at gcc dot gnu.org

--- Comment #1 from Martin Liška  ---
Started with r8-4385-ga297ccb52e0c894e.

[Bug c/100532] ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in useless_type_conversion_p, at gimple-expr.c:259

2021-05-12 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100532

Martin Liška  changed:

   What|Removed |Added

 CC||marxin at gcc dot gnu.org
   Last reconfirmed||2021-05-12
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1

[Bug go/100537] Bootstrap-O3 and bootstrap-debug fail on 32-bit ARM after gcc-12-657-ga076632e274a

2021-05-12 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100537

--- Comment #7 from Richard Biener  ---
So you can try if the following fixes the bootstrap.

diff --git a/gcc/go/go-gcc.cc b/gcc/go/go-gcc.cc
index 5d9dbb5d068..18673e54c96 100644
--- a/gcc/go/go-gcc.cc
+++ b/gcc/go/go-gcc.cc
@@ -1680,6 +1680,7 @@ Gcc_backend::address_expression(Bexpression* bexpr,
Location location)
   if (expr == error_mark_node)
 return this->error_expression();

+  mark_addressable (expr);
   tree ret = build_fold_addr_expr_loc(location.gcc_location(), expr);
   return this->make_expression(ret);
 }

[Bug rtl-optimization/100539] [10/11/12 Regression] wrong code at -Os and above with "-fno-dce -fno-inline-small-functions -fno-tree-dce" since r10-3311-gff6686d2e5f797d6

2021-05-12 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100539

Martin Liška  changed:

   What|Removed |Added

 CC||jamborm at gcc dot gnu.org,
   ||marxin at gcc dot gnu.org
Summary|wrong code at -Os and above |[10/11/12 Regression] wrong
   |with "-fno-dce  |code at -Os and above with
   |-fno-inline-small-functions |"-fno-dce
   |-fno-tree-dce"  |-fno-inline-small-functions
   ||-fno-tree-dce" since
   ||r10-3311-gff6686d2e5f797d6

--- Comment #2 from Martin Liška  ---
Started likely with r10-3311-gff6686d2e5f797d6.

[Bug c/100544] ICE: in default_conversion with destructor attribute at the top level

2021-05-12 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100544

Martin Liška  changed:

   What|Removed |Added

   Last reconfirmed||2021-05-12
 Ever confirmed|0   |1
 CC||marxin at gcc dot gnu.org
 Status|UNCONFIRMED |NEW

[Bug target/100549] [12 Regression] ICE: Segmentation fault with __builtin_ia32_pcmpgtw128 since r12-110-gc54a9f7259fce1a2

2021-05-12 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100549

Martin Liška  changed:

   What|Removed |Added

   Last reconfirmed||2021-05-12
 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW
 CC||hjl.tools at gmail dot com,
   ||marxin at gcc dot gnu.org
Summary|ICE: Segmentation fault |[12 Regression] ICE:
   |with|Segmentation fault with
   |__builtin_ia32_pcmpgtw128   |__builtin_ia32_pcmpgtw128
   ||since
   ||r12-110-gc54a9f7259fce1a2

--- Comment #1 from Martin Liška  ---
Started with r12-110-gc54a9f7259fce1a2.

[Bug c/100550] [11/12 Regression] ICE: in fold_convert_loc with function call VLA argument

2021-05-12 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100550

Martin Liška  changed:

   What|Removed |Added

 CC||marxin at gcc dot gnu.org,
   ||msebor at gcc dot gnu.org

--- Comment #3 from Martin Liška  ---
Yes, started with r11-3303-g6450f07388f9fe57.

[Bug fortran/100551] [11/12 Regression] Passing return value of intrinsic to class(*) dummy argument can cause segfaults

2021-05-12 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100551

Martin Liška  changed:

   What|Removed |Added

   Last reconfirmed||2021-05-12
 Status|UNCONFIRMED |NEW
 CC||marxin at gcc dot gnu.org,
   ||pault at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Started with r11-6928-g4225af228b5d52e8.

[Bug middle-end/100556] ICE: in gimplify_expr with __transaction_atomic without -ftm

2021-05-12 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100556

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1
 CC||marxin at gcc dot gnu.org
   Last reconfirmed||2021-05-12

[Bug middle-end/100562] [12 Regression] ICE after commit a076632e274abe344ca7648b7c7f299273d4cbe0

2021-05-12 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100562

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
Summary|ICE after commit|[12 Regression] ICE after
   |a076632e274abe344ca7648b7c7 |commit
   |f299273d4cbe0   |a076632e274abe344ca7648b7c7
   ||f299273d4cbe0
 Ever confirmed|0   |1
 CC||marxin at gcc dot gnu.org,
   ||rguenth at gcc dot gnu.org
   Last reconfirmed||2021-05-12

[Bug ada/100564] New: [12 Regression] Broken Ada bootstrap

2021-05-12 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100564

Bug ID: 100564
   Summary: [12 Regression] Broken Ada bootstrap
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ada
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marxin at gcc dot gnu.org
  Target Milestone: ---

I see the following crash when using stage1 GNAT compiler:

abuild@marxinbox:~/rpmbuild/BUILD/gcc-12.0.0+git185139/obj-x86_64-suse-linux/gcc>
valgrind --trace-children=yes
/home/abuild/rpmbuild/BUILD/gcc-12.0.0+git185139/obj-x86_64-suse-linux/./prev-gcc/xgcc
-B/home/abuild/rpmbuild/BUILD/gcc-12.0.0+git185139/obj-x86_64-suse-linux/./prev-gcc/
-B/usr/x86_64-suse-linux/bin/ -B/usr/x86_64-suse-linux/bin/
-B/usr/x86_64-suse-linux/lib/ -isystem /usr/x86_64-suse-linux/include -isystem
/usr/x86_64-suse-linux/sys-include   -fno-checking -c -fmessage-length=0
-grecord-gcc-switches -O2 -D_FORTIFY_SOURCE=2 -funwind-tables
-fasynchronous-unwind-tables -fstack-clash-protection -g -U_FORTIFY_SOURCE
-fno-checking -gtoggle -fprofile-generate  -gnatpg -gnatwns  -W -Wall -nostdinc
-I- -I. -Iada/generated -Iada -Iada/gcc-interface -I../../gcc/ada
-I../../gcc/ada/gcc-interface -Iada/libgnat -I../../gcc/ada/libgnat
../../gcc/ada/sem_intr.adb -o ada/sem_intr.o
==14193== Memcheck, a memory error detector
==14193== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==14193== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==14193== Command:
/home/abuild/rpmbuild/BUILD/gcc-12.0.0+git185139/obj-x86_64-suse-linux/./prev-gcc/xgcc
-B/home/abuild/rpmbuild/BUILD/gcc-12.0.0+git185139/obj-x86_64-suse-linux/./prev-gcc/
-B/usr/x86_64-suse-linux/bin/ -B/usr/x86_64-suse-linux/bin/
-B/usr/x86_64-suse-linux/lib/ -isystem /usr/x86_64-suse-linux/include -isystem
/usr/x86_64-suse-linux/sys-include -fno-checking -c -fmessage-length=0
-grecord-gcc-switches -O2 -D_FORTIFY_SOURCE=2 -funwind-tables
-fasynchronous-unwind-tables -fstack-clash-protection -g -U_FORTIFY_SOURCE
-fno-checking -gtoggle -fprofile-generate -gnatpg -gnatwns -W -Wall -nostdinc
-I- -I. -Iada/generated -Iada -Iada/gcc-interface -I../../gcc/ada
-I../../gcc/ada/gcc-interface -Iada/libgnat -I../../gcc/ada/libgnat
../../gcc/ada/sem_intr.adb -o ada/sem_intr.o
==14193== 
==14194== Memcheck, a memory error detector
==14194== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==14194== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==14194== Command:
/home/abuild/rpmbuild/BUILD/gcc-12.0.0+git185139/obj-x86_64-suse-linux/./prev-gcc/gnat1
-I - -I . -I ada/generated -I ada -I ada/gcc-interface -I ../../gcc/ada -I
../../gcc/ada/gcc-interface -I ada/libgnat -I ../../gcc/ada/libgnat -gnatwa
-quiet -nostdinc -O2 -Wextra -Wall -dumpdir ada/ -dumpbase sem_intr.adb
-dumpbase-ext .adb -fmessage-length=0 -grecord-gcc-switches -funwind-tables
-fasynchronous-unwind-tables -fstack-clash-protection -g -fno-checking -gtoggle
-fprofile-generate -gnatpg -gnatwns -mtune=generic -march=x86-64 -gnatO
ada/sem_intr.o ../../gcc/ada/sem_intr.adb -o /tmp/ccDExgSm.s
==14194== 
--14194-- WARNING: Serious error when reading debug info
--14194-- When reading debug info from
/home/abuild/rpmbuild/BUILD/gcc-12.0.0+git185139/obj-x86_64-suse-linux/prev-gcc/gnat1:
--14194-- get_inlFnName: absori not a subprogram
==14194== Conditional jump or move depends on uninitialised value(s)
==14194==at 0x4D43A3: atree__size_in_slots (atree.adb:2129)
==14194==by 0x4D535E: atree__change_node (atree.adb:1717)
==14194==by 0x79F55C: sinfo__cn__change_name_to_procedure_call_statement
(sinfo-cn.adb:142)
==14194==by 0x61F517: par__ch5__p_sequence_of_statements.4888
(par-ch5.adb:676)
==14194==by 0x623AC7: par__ch5__p_if_statement.7928 (par-ch5.adb:1222)
==14194==by 0x61DD23: par__ch5__p_sequence_of_statements.4888
(par-ch5.adb:891)
==14194==by 0x620639: par__ch11__p_handled_sequence_of_statements.4939
(par-ch11.adb:64)
==14194==by 0x62102A: par__ch5__parse_decls_begin_end.4891
(par-ch5.adb:2272)
==14194==by 0x621DD5: par__ch6__p_subprogram.4909 (par-ch6.adb:935)
==14194==by 0x612806: par__ch3__p_declarative_items.5836 (par-ch3.adb:4325)
==14194==by 0x620E3D: par__ch5__parse_decls_begin_end.4891
(par-ch3.adb:4273)
==14194==by 0x62454A: par__ch7__p_package.4912 (par-ch7.adb:184)
...

[Bug ada/100564] [12 Regression] Broken Ada bootstrap

2021-05-12 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100564

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Priority|P3  |P1
 CC||ebotcazou at gcc dot gnu.org
 Ever confirmed|0   |1
   Last reconfirmed||2021-05-12
   Target Milestone|--- |12.0

[Bug target/100563] [10/11/12 Regression] arm: ICE in arm_gen_dicompare_reg, at config/arm/arm.c:15976

2021-05-12 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100563

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |10.4

[Bug middle-end/100562] [12 Regression] ICE after commit a076632e274abe344ca7648b7c7f299273d4cbe0

2021-05-12 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100562

Richard Biener  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|NEW |RESOLVED
   Target Milestone|--- |12.0

--- Comment #1 from Richard Biener  ---
Dup

*** This bug has been marked as a duplicate of bug 100537 ***

[Bug go/100537] Bootstrap-O3 and bootstrap-debug fail on 32-bit ARM after gcc-12-657-ga076632e274a

2021-05-12 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100537

Richard Biener  changed:

   What|Removed |Added

 CC||stefansf at linux dot ibm.com

--- Comment #8 from Richard Biener  ---
*** Bug 100562 has been marked as a duplicate of this bug. ***

[Bug libstdc++/99327] ENOTSUP macro does not exist on djgpp crt

2021-05-12 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99327

--- Comment #2 from Jonathan Wakely  ---
Fixed in my fork:
https://gitlab.com/jonathan-wakely/gcc/-/commit/93847c75473b3509c305e20b60ffe86b120b8e4b

[Bug ada/100564] [12 Regression] valgrind complaints on gnat1

2021-05-12 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100564

Eric Botcazou  changed:

   What|Removed |Added

Summary|[12 Regression] Broken Ada  |[12 Regression] valgrind
   |bootstrap   |complaints on gnat1
   Priority|P1  |P3

--- Comment #1 from Eric Botcazou  ---
Regular bootstrap works fine though, I tried a couple of hours ago.

[Bug libstdc++/78113] std::variant and std::visit's current implementations do not get optimized out (compared to "recursive visitation")

2021-05-12 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78113

--- Comment #7 from Jonathan Wakely  ---
Fixed in my fork (for visiting a single variant of up to 11 alternative types):
https://gitlab.com/jonathan-wakely/gcc/-/commit/f5de3d9055e47b73cd1c4d35c235ebaa3f93a5e6

[Bug libstdc++/94418] Please make reverse_iterator nothrow constructible when possible

2021-05-12 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94418

--- Comment #6 from Jonathan Wakely  ---
Specifically:
https://gitlab.com/jonathan-wakely/gcc/-/commit/3e63e5a8f72caa3e700788dcbd959f7b738fb9d7

[Bug libstdc++/100153] Undefined behavior in stl_bvector.h

2021-05-12 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100153

--- Comment #3 from Jonathan Wakely  ---
Fixed downstream (corrected URL):
https://gitlab.com/jonathan-wakely/gcc/-/commit/9487ef2967f89f1cd25bcf4f922bd40ecf18e9ea

[Bug ada/100564] [12 Regression] valgrind complaints on gnat1

2021-05-12 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100564

--- Comment #2 from Eric Botcazou  ---
Created attachment 50799
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50799&action=edit
Tentative fix

Please give it a try in your setup.

[Bug fortran/100561] Error while computing square of a real number (8 and 16 bytes)

2021-05-12 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100561

--- Comment #4 from Richard Biener  ---
It looks like gfortran parses the constant in single-precision, which might be
an issue with your fortran source.

[Bug libstdc++/90943] Visiting inherited variants no longer works in 9.1

2021-05-12 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90943

--- Comment #8 from Jonathan Wakely  ---
Corrected URL for downstream fix:
https://gitlab.com/jonathan-wakely/gcc/-/commit/486d89e403a18ef78f05f2efb1bc86bbd396899c

[Bug fortran/100561] Error while computing square of a real number (8 and 16 bytes)

2021-05-12 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100561

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #5 from Richard Biener  ---
it is.

real(8), parameter :: pi = 3.1415926535d0

works for example.

[Bug libstdc++/96733] std::clamp for floats and doubles produces worse code than a combo of std::min / std::max

2021-05-12 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96733

--- Comment #7 from Jonathan Wakely  ---
In my GCC fork I just switched clamp to use min and max unconditionally:
https://gitlab.com/jonathan-wakely/gcc/-/commit/ec5ecc2e142fbb7fc532a5ef9527b61675bcbfc4

[Bug fortran/100561] Error while computing square of a real number (8 and 16 bytes)

2021-05-12 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100561

--- Comment #6 from Andrew Pinski  ---
This is invalid because you wrote:
3.1415926535897932384626433832795028841971693993751058209749445923

And not:
3.1415926535897932384626433832795028841971693993751058209749445923_16

The first is a real type which is already rounded to 64bit.

When I used the _16, I get the correct answer.

[Bug target/99988] aarch64: GCC generates excessive consecutive bti j instructions

2021-05-12 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99988

--- Comment #7 from CVS Commits  ---
The releases/gcc-10 branch has been updated by Alex Coplan
:

https://gcc.gnu.org/g:419c243dfb9aba51aceb1370a241db082847eeb5

commit r10-9818-g419c243dfb9aba51aceb1370a241db082847eeb5
Author: Alex Coplan 
Date:   Wed Apr 21 14:42:04 2021 +0100

aarch64: Avoid duplicating bti j insns for jump tables [PR99988]

This patch fixes PR99988 which shows us generating large (> 250)
sequences of back-to-back bti j instructions.

The fix is simply to avoid inserting bti j instructions at the target of
a jump table if we've already inserted one for a given label.

Co-Authored-By: Christophe Lyon 

gcc/ChangeLog:

PR target/99988
* config/aarch64/aarch64-bti-insert.c (aarch64_bti_j_insn_p): New.
(rest_of_insert_bti): Avoid inserting duplicate bti j insns for
jump table targets.

gcc/testsuite/ChangeLog:

PR target/99988
* gcc.target/aarch64/pr99988.c: New test.

(cherry picked from commit 1011bb8bc67cf34c45a9237d72a801a14ad9ef0f)

[Bug sanitizer/100439] stack overflow running ubsan

2021-05-12 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100439

--- Comment #4 from Martin Liška  ---
The test-case links to some static libraries:
lib/libgmock_maind.a

please provide full steps how to reproduce that?

[Bug ada/100564] [12 Regression] valgrind complaints on gnat1

2021-05-12 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100564

--- Comment #3 from Martin Liška  ---
(In reply to Eric Botcazou from comment #2)
> Created attachment 50799 [details]
> Tentative fix
> 
> Please give it a try in your setup.

It helps! Thank you.

[Bug ada/100559] Solaris SPARC GCC 11.1 Ada build: i-cexten.ads:278:28: modulus exceeds limit (2 ** 64)

2021-05-12 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100559

Eric Botcazou  changed:

   What|Removed |Added

   Last reconfirmed||2021-05-12
 Status|UNCONFIRMED |WAITING
 CC||ebotcazou at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #2 from Eric Botcazou  ---
This is known to work though, so could you post the configure line?

[Bug ada/100564] [12 Regression] valgrind complaints on gnat1

2021-05-12 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100564

--- Comment #4 from CVS Commits  ---
The master branch has been updated by Eric Botcazou :

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

commit r12-744-gac18ded230f1559f271f8d66121b2f16805f0b27
Author: Bob Duff 
Date:   Wed May 12 11:56:47 2021 +0200

Fix uninitialized variable in Atree.Size_In_Slots

Size_In_Slots uses the Nkind to look up the size in a table indexed
by Nkind.  This patch fixes a couple of places where the Nkind is
wrong (uninitialized or zeroed out) so Size_In_Slots cannot be used.

gcc/ada/
PR ada/100564
* atree.adb (Change_Node): Do not call Zero_Slots on a Node_Id
when the Nkind has not yet been set; call the other Zero_Slots
that takes a range of slot offsets.  Call the new Mutate_Kind
that takes an Old_Size, for the same reason -- the size cannot
be computed without the Nkind.
(Mutate_Nkind): New function that allows specifying the Old_Size.
(Size_In_Slots): Assert that the Nkind has proper (nonzero) value.
* atree.ads: Minor reformatting.

[Bug ada/100564] [12 Regression] valgrind complaints on gnat1

2021-05-12 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100564

Eric Botcazou  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #5 from Eric Botcazou  ---
.

[Bug ada/100559] Solaris SPARC GCC 11.1 Ada build: i-cexten.ads:278:28: modulus exceeds limit (2 ** 64)

2021-05-12 Thread sumbera at volny dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100559

--- Comment #3 from Petr Sumbera  ---
(cd /builds/psumbera/userland-gcc-11.1/components/gcc10/build/sparcv9 ;
/usr/bin/env CONFIG_SHELL="/bin/sh"
PKG_CONFIG_PATH="/usr/lib/sparcv9/pkgconfig"
CC="/builds/psumbera/gcc10/bin/gcc" CXX="/builds/psumbera/gcc10/bin/g++"
PATH="/usr/bin/sparcv9:/builds/psumbera/gcc10/bin:/usr/gnu/bin:/usr/bin:/usr/perl5/bin"
CC_FOR_BUILD="/builds/psumbera/gcc10/bin/gcc -m64"
CXX_FOR_BUILD="/builds/psumbera/gcc10/bin/g++ -m64" CPPFLAGS="-m64"
"ac_cv_func_realloc_0_nonnull=yes" "NM=/usr/gnu/bin/nm"
INTLTOOL_PERL="/usr/perl5/5.22/bin/perl" LDFLAGS="" http_proxy= https_proxy=
ftp_proxy= PYTHON="/usr/bin/python3.7" /bin/sh \
   
/builds/psumbera/userland-gcc-11.1/components/gcc10/gcc-11.1.0/configure
--prefix=/usr/gcc/11 --mandir=/usr/gcc/11/share/man --bindir=/usr/gcc/11/bin
--sbindir=/usr/gcc/11/sbin --libdir=/usr/gcc/11/lib   
--infodir=/usr/gcc/11/share/info --libexecdir=/usr/gcc/11/lib
--enable-languages="ada,c,c++,fortran,go,objc" --enable-shared
--enable-initfini-array --disable-rpath --with-system-zlib
--with-build-config=no --without-gnu-ld --with-ld=/usr/bin/ld --with-gnu-as
--with-as=/usr/gnu/bin/as BOOT_CFLAGS='-g -O2' sparcv9-sun-solaris2.11)

[Bug c/100505] ICE: in record_in_finally_tree, at tree-eh.c:213

2021-05-12 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100505

--- Comment #3 from Richard Biener  ---
(In reply to Chengnian Sun from comment #2)
> Should I avoid reporting test programs with __GIMPLE or __RTL?

I think so, at least if you're just mass-generating them somehow.  I think
it's OK to report ICEs without prior reported errors - those we'd
eventually want to fix.  So for __GIMPLE at least make sure to pass -fgimple
to get rid of the first reported error.

[Bug ada/100559] Solaris SPARC GCC 11.1 Ada build: i-cexten.ads:278:28: modulus exceeds limit (2 ** 64)

2021-05-12 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100559

--- Comment #4 from Eric Botcazou  ---
> (cd /builds/psumbera/userland-gcc-11.1/components/gcc10/build/sparcv9 ;
> /usr/bin/env CONFIG_SHELL="/bin/sh"
> PKG_CONFIG_PATH="/usr/lib/sparcv9/pkgconfig"
> CC="/builds/psumbera/gcc10/bin/gcc" CXX="/builds/psumbera/gcc10/bin/g++"
> PATH="/usr/bin/sparcv9:/builds/psumbera/gcc10/bin:/usr/gnu/bin:/usr/bin:/usr/
> perl5/bin" CC_FOR_BUILD="/builds/psumbera/gcc10/bin/gcc -m64"
> CXX_FOR_BUILD="/builds/psumbera/gcc10/bin/g++ -m64" CPPFLAGS="-m64"
> "ac_cv_func_realloc_0_nonnull=yes" "NM=/usr/gnu/bin/nm"
> INTLTOOL_PERL="/usr/perl5/5.22/bin/perl" LDFLAGS="" http_proxy= https_proxy=
> ftp_proxy= PYTHON="/usr/bin/python3.7" /bin/sh \
>
> /builds/psumbera/userland-gcc-11.1/components/gcc10/gcc-11.1.0/configure
> --prefix=/usr/gcc/11 --mandir=/usr/gcc/11/share/man --bindir=/usr/gcc/11/bin
> --sbindir=/usr/gcc/11/sbin --libdir=/usr/gcc/11/lib   
> --infodir=/usr/gcc/11/share/info --libexecdir=/usr/gcc/11/lib
> --enable-languages="ada,c,c++,fortran,go,objc" --enable-shared
> --enable-initfini-array --disable-rpath --with-system-zlib
> --with-build-config=no --without-gnu-ld --with-ld=/usr/bin/ld --with-gnu-as
> --with-as=/usr/gnu/bin/as BOOT_CFLAGS='-g -O2' sparcv9-sun-solaris2.11)

Thanks.  What configure line do you use for the Intel build?

[Bug target/100563] [10/11/12 Regression] arm: ICE in arm_gen_dicompare_reg, at config/arm/arm.c:15976

2021-05-12 Thread acoplan at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100563

Alex Coplan  changed:

   What|Removed |Added

 CC||rearnsha at gcc dot gnu.org

--- Comment #1 from Alex Coplan  ---
Started with r10-3986-gaf74bfeee1faccef25dc0086d4249eb0f127c820:

commit af74bfeee1faccef25dc0086d4249eb0f127c820
Author: Richard Earnshaw 
Date:   Fri Oct 18 20:03:50 2019

[arm] Handle some constant comparisons using rsbs+rscs

[Bug ada/100559] Solaris SPARC GCC 11.1 Ada build: i-cexten.ads:278:28: modulus exceeds limit (2 ** 64)

2021-05-12 Thread sumbera at volny dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100559

--- Comment #5 from Petr Sumbera  ---
(In reply to Eric Botcazou from comment #4)
> Thanks.  What configure line do you use for the Intel build?

(cd /builds/psumbera/userland-gcc-11.1/components/gcc10/build/amd64 ;
/usr/bin/env CONFIG_SHELL="/bin/sh" PKG_CONFIG_PATH="/usr/lib/amd64/pkgconfig"
CC="/builds/psumbera/gcc10/bin/gcc" CXX="/builds/psumbera/gcc10/bin/g++"
PATH="/usr/bin/amd64:/builds/psumbera/gcc10/bin:/usr/gnu/bin:/usr/bin:/usr/perl5/bin"
CC_FOR_BUILD="/builds/psumbera/gcc10/bin/gcc -m64"
CXX_FOR_BUILD="/builds/psumbera/gcc10/bin/g++ -m64" CPPFLAGS="-m64"
"ac_cv_func_realloc_0_nonnull=yes" "NM=/usr/gnu/bin/nm"
INTLTOOL_PERL="/usr/perl5/5.22/bin/perl" LDFLAGS="" http_proxy= https_proxy=
ftp_proxy= PYTHON="/usr/bin/python3.7" /bin/sh \
   
/builds/psumbera/userland-gcc-11.1/components/gcc10/gcc-11.1.0/configure
--prefix=/usr/gcc/11 --mandir=/usr/gcc/11/share/man --bindir=/usr/gcc/11/bin
--sbindir=/usr/gcc/11/sbin --libdir=/usr/gcc/11/lib   
--infodir=/usr/gcc/11/share/info --libexecdir=/usr/gcc/11/lib
--enable-languages="ada,c,c++,fortran,go,objc" --enable-shared
--enable-initfini-array --disable-rpath --with-system-zlib
--with-build-config=no --without-gnu-ld --with-ld=/usr/bin/ld --with-gnu-as
--with-as=/usr/gnu/bin/as BOOT_CFLAGS='-g -O2' x86_64-pc-solaris2.11)

[Bug target/100563] [10/11/12 Regression] arm: ICE in arm_gen_dicompare_reg, at config/arm/arm.c:15976

2021-05-12 Thread rearnsha at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100563

--- Comment #2 from Richard Earnshaw  ---
Er, wow, I'm surprised this hasn't come up before.

The problem is that the cstore_cc pattern in arm.md has no predicates on the
operands and no constraints on the modes of those operands and yet it then
immediately calls arm_gen_compare_reg and expects it to handle what has been
thrown at it.

I'll have to think about this a bit...

[Bug target/96005] Add possibility to use newer ptx isa

2021-05-12 Thread vries at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96005

--- Comment #4 from Tom de Vries  ---
Created attachment 50800
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50800&action=edit
Tentative patch

[Bug ada/100559] Solaris SPARC GCC 11.1 Ada build: i-cexten.ads:278:28: modulus exceeds limit (2 ** 64)

2021-05-12 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100559

--- Comment #6 from Eric Botcazou  ---
> /builds/psumbera/userland-gcc-11.1/components/gcc10/gcc-11.1.0/configure
> --prefix=/usr/gcc/11 --mandir=/usr/gcc/11/share/man --bindir=/usr/gcc/11/bin
> --sbindir=/usr/gcc/11/sbin --libdir=/usr/gcc/11/lib   
> --infodir=/usr/gcc/11/share/info --libexecdir=/usr/gcc/11/lib
> --enable-languages="ada,c,c++,fortran,go,objc" --enable-shared
> --enable-initfini-array --disable-rpath --with-system-zlib
> --with-build-config=no --without-gnu-ld --with-ld=/usr/bin/ld --with-gnu-as
> --with-as=/usr/gnu/bin/as BOOT_CFLAGS='-g -O2' x86_64-pc-solaris2.11)

Thanks.  A bit of mystery then, the configurations are exactly symmetrical.

Have you made local modifications to the source code or is it pristine?

[Bug go/100537] Bootstrap-O3 and bootstrap-debug fail on 32-bit ARM after gcc-12-657-ga076632e274a

2021-05-12 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100537

--- Comment #9 from Jiu Fu Guo  ---
Yes,

diff --git a/gcc/go/go-gcc.cc b/gcc/go/go-gcc.cc
index 5d9dbb5d068..32637a44af1 100644
--- a/gcc/go/go-gcc.cc
+++ b/gcc/go/go-gcc.cc
@@ -1680,6 +1680,7 @@ Gcc_backend::address_expression(Bexpression* bexpr,
Location location)
   if (expr == error_mark_node)
 return this->error_expression();

+  TREE_ADDRESSABLE(expr) = 1;
   tree ret = build_fold_addr_expr_loc(location.gcc_location(), expr);
   return this->make_expression(ret);
 }

Could pass bootstrap.

[Bug tree-optimization/100519] ICE in insert_stmt_after, at tree-ssa-reassoc.c:1452

2021-05-12 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100519

--- Comment #2 from CVS Commits  ---
The master branch has been updated by Richard Biener :

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

commit r12-745-gcd36bbb2281ada10b5e1df143ecf64b88cdb8119
Author: Richard Biener 
Date:   Tue May 11 14:59:59 2021 +0200

tree-optimization/100519 - avoid reassociating asm goto defs

This splits can_associate_p into checks for SSA defs and checks
for the type so it can be called from is_reassociable_op to
catch cases not catched by the earlier fix.

2021-05-11  Richard Biener  

PR tree-optimization/100519
* tree-ssa-reassoc.c (can_associate_p): Split into...
(can_associate_op_p): ... this
(can_associate_type_p): ... and this.
(is_reassociable_op): Call can_associate_op_p.
(break_up_subtract_bb): Call the appropriate predicates.
(reassociate_bb): Likewise.

* gcc.dg/torture/pr100519.c: New testcase.

[Bug tree-optimization/100519] [11 Regression] ICE in insert_stmt_after, at tree-ssa-reassoc.c:1452

2021-05-12 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100519

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |11.2
   Priority|P3  |P2
Summary|ICE in insert_stmt_after,   |[11 Regression] ICE in
   |at tree-ssa-reassoc.c:1452  |insert_stmt_after, at
   ||tree-ssa-reassoc.c:1452
  Known to work||12.0

--- Comment #3 from Richard Biener  ---
Fixed on trunk sofar.

[Bug ada/100559] Solaris SPARC GCC 11.1 Ada build: i-cexten.ads:278:28: modulus exceeds limit (2 ** 64)

2021-05-12 Thread sumbera at volny dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100559

--- Comment #7 from Petr Sumbera  ---
(In reply to Eric Botcazou from comment #6)
> Have you made local modifications to the source code or is it pristine?

No local changes.

I wonder where i-cexten.ads is being modified...

[Bug target/100497] [OpenMP][nvptx] libgomp.c-c++-common/reduction-5.c - fails on some nvptx systems

2021-05-12 Thread vries at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100497

--- Comment #12 from Tom de Vries  ---
After investigation by Tobias, this looks like an instance of PR96932.

[Bug target/96932] [nvptx] atomic_exchange missing barrier

2021-05-12 Thread burnus at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96932

Tobias Burnus  changed:

   What|Removed |Added

 CC||burnus at gcc dot gnu.org

--- Comment #3 from Tobias Burnus  ---
Crossref: PR100497 - fails on Volta without
  membar.sys;
before
  atom.global.exch.b32

Unfortunately, compared to pre-Volta, it is very slow - membar.gl is still slow
but a bit less.  Using (→ sm_70) fence.sys / fence.gnu instead of
fence.sc.{sys,gnu} (= membar.{sys,gl} on >= sm_70) does not seem to make a
performance difference for PR100497.

[Bug target/100563] [10/11/12 Regression] arm: ICE in arm_gen_dicompare_reg, at config/arm/arm.c:15976

2021-05-12 Thread rearnsha at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100563

Richard Earnshaw  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Assignee|unassigned at gcc dot gnu.org  |rearnsha at gcc dot 
gnu.org
   Last reconfirmed||2021-05-12
 Status|UNCONFIRMED |ASSIGNED

--- Comment #3 from Richard Earnshaw  ---
err, no it's not that.  We start off with LEU(x, -1) but because we can't do
that directly, we swap the operand order to GEU(-1, x).  But
arm_gen_dicompare_reg can't handle that, so arm_validize_comparison needs to
push the constant into a register.

[Bug ada/100559] Solaris SPARC GCC 11.1 Ada build: i-cexten.ads:278:28: modulus exceeds limit (2 ** 64)

2021-05-12 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100559

--- Comment #8 from Eric Botcazou  ---
> No local changes.
> 
> I wonder where i-cexten.ads is being modified...

Unlikely I'd say.  Could you go into the $(buildir]/gcc/ada directory and do:
  ls -l rts/i-cexten.ads
  ls -l rts_32/i-cexten.ads
They should not point to the same source file.

[Bug ipa/100539] [10/11/12 Regression] wrong code at -Os and above with "-fno-dce -fno-inline-small-functions -fno-tree-dce" since r10-3311-gff6686d2e5f797d6

2021-05-12 Thread jamborm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100539

Martin Jambor  changed:

   What|Removed |Added

  Component|rtl-optimization|ipa
 Resolution|--- |DUPLICATE
 Status|NEW |RESOLVED

--- Comment #3 from Martin Jambor  ---
Perhaps not surprisingly, it's a dup of PR 93385.  The posted patches fix this
testcase too.

*** This bug has been marked as a duplicate of bug 93385 ***

[Bug ipa/93385] [10/11/12 Regression] wrong code with u128 modulo at -O2 -fno-dce -fno-ipa-cp -fno-tree-dce

2021-05-12 Thread jamborm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93385

Martin Jambor  changed:

   What|Removed |Added

 CC||zhendong.su at inf dot ethz.ch

--- Comment #44 from Martin Jambor  ---
*** Bug 100539 has been marked as a duplicate of this bug. ***

[Bug target/99908] SIMD: negating logical + if_else has a suboptimal codegen.

2021-05-12 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99908

--- Comment #5 from CVS Commits  ---
The master branch has been updated by hongtao Liu :

https://gcc.gnu.org/g:8da3b309d8fb3ddec0b42218ca6762967b402dc3

commit r12-746-g8da3b309d8fb3ddec0b42218ca6762967b402dc3
Author: liuhongt 
Date:   Wed Apr 7 09:58:54 2021 +0800

i386: Optimize vpblendvb on inverted mask register to vpblendvb on swapping
the order of operand 1 and operand 2. [PR target/99908]

-   vpcmpeqd%ymm3, %ymm3, %ymm3
-   vpandn  %ymm3, %ymm2, %ymm2
-   vpblendvb   %ymm2, %ymm1, %ymm0, %ymm0
+   vpblendvb   %ymm2, %ymm0, %ymm1, %ymm0

gcc/ChangeLog:

PR target/99908
* config/i386/sse.md (_pblendvb): Add
splitters for pblendvb of NOT mask register.

gcc/testsuite/ChangeLog:

PR target/99908
* gcc.target/i386/avx2-pr99908.c: New test.
* gcc.target/i386/sse4_1-pr99908.c: New test.

[Bug target/99908] SIMD: negating logical + if_else has a suboptimal codegen.

2021-05-12 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99908

--- Comment #6 from Hongtao.liu  ---
Should be fixed in trunk.

[Bug target/99908] SIMD: negating logical + if_else has a suboptimal codegen.

2021-05-12 Thread rearnsha at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99908

--- Comment #7 from Richard Earnshaw  ---
(In reply to Hongtao.liu from comment #6)
> Should be fixed in trunk.

The original report was about arm.  None of your changes are outside of the x86
backend, so no, this is not fixed for the original reporter.

[Bug target/99908] SIMD: negating logical + if_else has a suboptimal codegen.

2021-05-12 Thread rearnsha at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99908

--- Comment #8 from Richard Earnshaw  ---
Never mind, the original reference to arm was not the 'arm cpu', my mistake.

[Bug target/96932] [nvptx] atomic_exchange missing barrier

2021-05-12 Thread vries at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96932

--- Comment #4 from Tom de Vries  ---
(In reply to Tobias Burnus from comment #3)
> Crossref: PR100497 - fails on Volta without
>   membar.sys;
> before
>   atom.global.exch.b32
> 
> Unfortunately, compared to pre-Volta, it is very slow - membar.gl is still
> slow but a bit less.  Using (→ sm_70) fence.sys / fence.gnu instead of
> fence.sc.{sys,gnu} (= membar.{sys,gl} on >= sm_70) does not seem to make a

fence.sc.gpu, funny typo :)

> performance difference for PR100497.

The GOMP_atomic_start/GOMP_atomic_end are fallbacks, and unfortunately cannot
be expected to be too optimal.

Following the introduction of -mptx=6.3 we can add support for atom.cas.b16
(well, once we also introduce misa=sm_70), and that should be the optimal
solution.

[Bug bootstrap/100552] [11/12 Regression] configure: 32208: Syntax error: Bad substitution

2021-05-12 Thread mhillen at linux dot ibm.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100552

--- Comment #1 from Marius Hillenbrand  ---
Indeed, that line should not use the bash-specific pattern substitution and
instead like this:


diff --git a/gcc/configure.ac b/gcc/configure.ac
index e9ba2af548a..4e788019d99 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -7499,7 +7499,8 @@ case $target in
   # cross build. are target headers available?
   # carefully coerce the build-system compiler to use target headers
   saved_CXXFLAGS="$CXXFLAGS"
-  CROSS_TEST_CXXFLAGS="-nostdinc ${XGCC_FLAGS_FOR_TARGET//-B/-idirafter/}"
+  fixed_XGCC_FLAGS_FOR_TARGET=`echo "$XGCC_FLAGS_FOR_TARGET" | sed
's/-B/-idirafter/g'`
+  CROSS_TEST_CXXFLAGS="-nostdinc $fixed_XGCC_FLAGS_FOR_TARGET"
   CXXFLAGS="$CROSS_TEST_CXXFLAGS"
   AC_COMPILE_IFELSE([AC_LANG_SOURCE([[


not fully tested yet, but it avoids the syntax error in dash and in NetBSD 9.1

[Bug target/100565] New: [nvptx] Need configure options for misa default

2021-05-12 Thread vries at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100565

Bug ID: 100565
   Summary: [nvptx] Need configure options for misa default
   Product: gcc
   Version: 12.0
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

We have -misa, and soon we'll have -mptx (PR96005).

We can try to make sensible decisions about proper defaults, but we still may
get it wrong for some users.  So, better allow users to override the default in
a way that does not involve changing the sources.

Something like --with-nvptx-isa=sm_30 --with-nvptx-ptx-version=3.1.

[Bug tree-optimization/100566] New: [11/12 Regression] Miscompilation of mausezahn since r11-2446

2021-05-12 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100566

Bug ID: 100566
   Summary: [11/12 Regression] Miscompilation of mausezahn since
r11-2446
   Product: gcc
   Version: 11.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jakub at gcc dot gnu.org
  Target Milestone: ---

The following testcase is miscompiled at -O2 since
r11-2446-g3e61a2056335ca7d4e2009823efae4ee2dc950ee
- it loops endlessly instead of terminating.

struct S { unsigned int s1, s2; int s3, s4, s5, s6, s7; unsigned int s8; };
struct S s;
enum E { E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11, E12, E13, E14, E15 };
enum E e;
int f, g, h;

__attribute__((noipa)) void fn1 (void *l)
{
  asm volatile ("" : : "r" (l) : "memory");
}

__attribute__((noipa)) int fn2 (void *l)
{
  asm volatile ("" : : "r" (l) : "memory");
  return 0;
}

__attribute__((noipa)) int fn3 (void)
{
  asm volatile ("" : : : "memory");
  return 0;
}

__attribute__((nothrow, leaf, noipa)) int fn4 (void)
{
  asm volatile ("" : : : "memory");
  return 0;
}

__attribute__((noipa)) int fn5 (unsigned int l)
{
  asm volatile ("" : : "r" (l) : "memory");
  return 0;
}

__attribute__((noipa)) int fn6 (void *l, int t)
{
  asm volatile ("" : : "r" (l), "r" (t) : "memory");
  return 0;
}

__attribute__((noipa)) int fn7 (void *l, int t)
{
  asm volatile ("" : : "r" (l), "r" (t) : "memory");
  return 0;
}

__attribute__((noipa)) int fn8 (void *l, int t)
{
  asm volatile ("" : : "r" (l), "r" (t) : "memory");
  return 0;
}

__attribute__((noipa)) int fn9 (void *l, int t)
{
  asm volatile ("" : : "r" (l), "r" (t) : "memory");
  return 0;
}

__attribute__((noipa)) int fn10 (void *l, int t)
{
  asm volatile ("" : : "r" (l), "r" (t) : "memory");
  return 0;
}

__attribute__((noipa)) int fn11 (void *l, int t)
{
  asm volatile ("" : : "r" (l), "r" (t) : "memory");
  return 0;
}

__attribute__((noipa)) int fn12 (void *l, int t)
{
  asm volatile ("" : : "r" (l), "r" (t) : "memory");
  return 0;
}

__attribute__((noipa)) int fn13 (void *l, int t)
{
  asm volatile ("" : : "r" (l), "r" (t) : "memory");
  return 0;
}

__attribute__((noipa)) int fn14 (void *l, int t)
{
  asm volatile ("" : : "r" (l), "r" (t) : "memory");
  return 0;
}

__attribute__((noipa))
int test (void *l, int y, int z)
{
  int i = 0, s1;
  int s8, s7, s6, s5, s4, j = 0;
  s1 = s.s1;
  s8 = s.s8;
  s7 = s.s7;
  s6 = s.s6;
  s5 = s.s5;
  s4 = s.s4 | s.s3;
  if (e == E11)
j = 1;
  if (s1 == 0)
goto lab;
  for (i = 0; i < s1; i++)
{
lab:
  if (f)
{
  switch (e)
{
case E6:
  fn12 (l, z);
  break;
case E7:
case E9:
case E11:
case E13:
  fn13 (l, z);
  break;
case E8:
  fn14 (l, z);
  break;
}
}
  if (g)
fn3 ();
  fn2 (l);
  if (h)
s.s2 = (unsigned int) s.s2 * fn4 () / 2147483647;
  if (s.s2)
fn5 (s.s2);
  if (s8)
{
  if (fn11 (l, z) == 0)
goto lab;
}
  if (s7)
{
  if (fn9 (l, z) == 0)
goto lab;
}
  if (s6)
{
  if (fn10 (l, z) == 0)
goto lab;
}
  if (s5)
{
  if (fn8 (l, y) == 0)
goto lab;
}
  if (s4)
{
  if (fn7 (l, y) == 0)
goto lab;
}
  if (j)
fn6 (l, z);
  if (!s1)
goto lab;
}
  fn1 (l);
  return 0;
}

int
main ()
{
  asm volatile ("" : : "g" (&s), "g" (&e), "g" (&f), "g" (&g), "g" (&h) :
"memory");
  s.s1 = 1;
  e = E7;
  test (0, 2, 1);
  return 0;
}

[Bug tree-optimization/100566] [11/12 Regression] Miscompilation of mausezahn since r11-2446

2021-05-12 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100566

Jakub Jelinek  changed:

   What|Removed |Added

   Keywords||wrong-code
 CC||rguenth at gcc dot gnu.org
   Last reconfirmed||2021-05-12
   Priority|P3  |P2
 Status|UNCONFIRMED |NEW
   Target Milestone|--- |11.2
 Ever confirmed|0   |1

[Bug ada/100559] Solaris SPARC GCC 11.1 Ada build: i-cexten.ads:278:28: modulus exceeds limit (2 ** 64)

2021-05-12 Thread sumbera at volny dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100559

--- Comment #9 from Petr Sumbera  ---
(In reply to Eric Botcazou from comment #8)
> Unlikely I'd say.  Could you go into the $(buildir]/gcc/ada directory and do:
>   ls -l rts/i-cexten.ads
>   ls -l rts_32/i-cexten.ads
> They should not point to the same source file.

There is indeed some problem:

intel:
rts/i-cexten.ads ->
/builds/psumbera/userland-gcc-11.1/components/gcc10/gcc-11.1.0/gcc/ada/libgnat/i-cexten__128.ads
rts_32/i-cexten.ads ->
/builds/psumbera/userland-gcc-11.1/components/gcc10/gcc-11.1.0/gcc/ada/libgnat/i-cexten.ads

SPARC:
rts/i-cexten.ads ->
/builds/psumbera/userland-gcc-11.1/components/gcc10/gcc-11.1.0/gcc/ada/libgnat/i-cexten__128.ads
rts_32/i-cexten.ads ->
/builds/psumbera/userland-gcc-11.1/components/gcc10/gcc-11.1.0/gcc/ada/libgnat/i-cexten__128.ads

[Bug tree-optimization/100566] [11/12 Regression] Miscompilation of mausezahn since r11-2446

2021-05-12 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100566

--- Comment #1 from Jakub Jelinek  ---
Though, on more reduced testcase from that it started already in
r9-2635-g78ea9abc2018243af7f7ada6135144ac90c6ad27
(likewise at -O2):
volatile int s, c;

__attribute__((noipa)) void
foo (void)
{
  if (c++ > 1)
__builtin_abort ();
}

__attribute__((noipa)) int
bar (void)
{
  int i = 0, j = s;
  if (j == 0)
goto lab;
  for (i = 0; i < j; i++)
{
lab:
  foo ();
  if (!j)
goto lab;
}
  return 0;
}

int
main ()
{
  s = 1;
  bar ();
  if (c != 1)
__builtin_abort ();
  return 0;
}

[Bug tree-optimization/100566] [11/12 Regression] Miscompilation of mausezahn since r9-2635

2021-05-12 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100566

Jakub Jelinek  changed:

   What|Removed |Added

   Target Milestone|11.2|9.4
Summary|[11/12 Regression]  |[11/12 Regression]
   |Miscompilation of mausezahn |Miscompilation of mausezahn
   |since r11-2446  |since r9-2635

[Bug tree-optimization/100566] [9/10/11/12 Regression] Miscompilation of mausezahn since r9-2635

2021-05-12 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100566

Richard Biener  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
 Status|NEW |ASSIGNED

--- Comment #2 from Richard Biener  ---
Mine.

[Bug tree-optimization/100566] [9/10/11/12 Regression] Miscompilation of mausezahn since r9-2635

2021-05-12 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100566

--- Comment #3 from Jakub Jelinek  ---
The r9-2635 change miscompiles it during PRE,
   [local count: 347387062]:
  j_7 ={v} s;
  if (j_7 == 0)
goto ; [34.00%]
  else
goto ; [66.00%]

   [local count: 291805133]:
  # i_8 = PHI <0(2), i_2(6)>

   [local count: 1073741825]:
  foo ();
  if (j_7 == 0)
goto ; [89.00%]
  else
goto ; [11.00%]

   [local count: 955630225]:
  goto ; [100.00%]

   [local count: 118111601]:
  i_10 = i_8 + 1;

   [local count: 347387062]:
  # i_2 = PHI 
  if (i_2 < j_7)
goto ; [50.00%]
  else
goto ; [50.00%]

   [local count: 173693531]:
  return 0;
looks ok, but PRE assumes the second j_7 == 0 is always true and thus turns the
foo () call into a tight endless loop:
   [local count: 1073741825]:
  foo ();
  goto ; [100.00%]
That is the intention of the testcase when s == 0, but not otherwise.

[Bug target/98461] Suboptimal codegen for negating a movemask

2021-05-12 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98461

--- Comment #15 from H.J. Lu  ---
Is this fixed now?

[Bug target/100336] file trunk/gcc/config/i386/i386-isa.def doesn't get installed ok ?

2021-05-12 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100336

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #3 from Jakub Jelinek  ---
Fixed.

[Bug target/98461] Suboptimal codegen for negating a movemask

2021-05-12 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98461

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #16 from Jakub Jelinek  ---
I hope so.

[Bug other/98375] [meta bug] GCC 12 pending patches

2021-05-12 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98375
Bug 98375 depends on bug 98461, which changed state.

Bug 98461 Summary: Suboptimal codegen for negating a movemask
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98461

   What|Removed |Added

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

[Bug preprocessor/100392] [11/12 Regression] compiling result of "g++ -E -fdirectives-only" causes "error: stray ‘#’ in program" if no newline at EOF

2021-05-12 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100392

--- Comment #3 from CVS Commits  ---
The master branch has been updated by Jakub Jelinek :

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

commit r12-748-gc6b664e2c4c127025e076d8b584abe0976694629
Author: Jakub Jelinek 
Date:   Wed May 12 15:14:35 2021 +0200

libcpp: Fix up -fdirectives-only preprocessing of includes not ending with
newline [PR100392]

If a header doesn't end with a new-line, with -fdirectives-only we right
now
preprocess it as
int i = 1;# 2 "pr100392.c" 2
i.e. the line directive isn't on the next line, which means we fail to
parse
it when compiling.

GCC 10 and earlier libcpp/directives-only.c had for this:
  if (!pfile->state.skipping && cur != base)
{
  /* If the file was not newline terminated, add rlimit, which is
 guaranteed to point to a newline, to the end of our range.  */
  if (cur[-1] != '\n')
{
  cur++;
  CPP_INCREMENT_LINE (pfile, 0);
  lines++;
}

  cb->print_lines (lines, base, cur - base);
}
and we have the assertion
  /* Files always end in a newline or carriage return.  We rely on this
for
 character peeking safety.  */
  gcc_assert (buffer->rlimit[0] == '\n' || buffer->rlimit[0] == '\r');
So, this patch just does readd the more less same thing, so that we emit
a newline after the inline even when it wasn't there before.

2021-05-12  Jakub Jelinek  

PR preprocessor/100392
* lex.c (cpp_directive_only_process): If buffer doesn't end with
'\n',
add buffer->rlimit[0] character to the printed range and
CPP_INCREMENT_LINE and increment line_count.

* gcc.dg/cpp/pr100392.c: New test.
* gcc.dg/cpp/pr100392.h: New file.

[Bug libstdc++/100567] New: views::take and views::drop should conditionally use _RangeAdaptor::operator()

2021-05-12 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100567

Bug ID: 100567
   Summary: views::take and views::drop should conditionally use
_RangeAdaptor::operator()
   Product: gcc
   Version: 12.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hewillk at gmail dot com
  Target Milestone: ---

Hi, the re-implemented range adaptors use _RangeAdaptor to handle the arg of
the adaptors, but for views::take and views::drop, the constraint that this arg
can perfectly forward to range::range_difference_t is lacking.

https://godbolt.org/z/j88q5Yn6Y

#include 
struct S {
  operator int() { return 0; }
};
const S obj;
auto r  = std::views::iota(0, 3);
auto d1 = r | std::views::drop(obj); // ok, should error
auto d2 = std::views::drop(r, obj);  // error
auto f1 = r | std::views::take(obj); // ok, should error
auto f2 = std::views::take(r, obj);  // error

  1   2   >