[Bug middle-end/100595] ICE: output_operand with static const int of address of label + difference of label

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100595

Andrew Pinski  changed:

   What|Removed |Added

 CC||141242068 at smail dot 
nju.edu.cn

--- Comment #5 from Andrew Pinski  ---
*** Bug 112499 has been marked as a duplicate of this bug. ***

[Bug middle-end/112499] [11/12/13/14 Regression] ICE in output_operand: invalid expression as operand with addition of 2 differences of address of labels

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112499

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|NEW |RESOLVED

--- Comment #5 from Andrew Pinski  ---
Dup.

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

[Bug middle-end/100595] ICE: output_operand with static const int of address of label + difference of label

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100595

--- Comment #4 from Andrew Pinski  ---
Updated testcase:
```
typedef __UINTPTR_TYPE__ uintptr_t;
int test2() {
  static uintptr_t a = (uintptr_t)(& + ((char *)& - (char *)&));
l1:
l2:
  return (int)a;
}
```

[Bug middle-end/94208] missing warning on passing unterminated local array to string functions

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94208

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Last reconfirmed||2024-04-07
 Status|UNCONFIRMED |NEW

--- Comment #1 from Andrew Pinski  ---
Confirmed.

[Bug middle-end/32581] make profiledbootstrap - stageprofile - gcc/ada/a-except.adb:1301: error: control flow in the middle of basic block 20

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32581

Andrew Pinski  changed:

   What|Removed |Added

 CC||terminatorul at gmail dot com

--- Comment #14 from Andrew Pinski  ---
*** Bug 39398 has been marked as a duplicate of this bug. ***

[Bug middle-end/39398] verify_flow_info failed

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39398

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|UNCONFIRMED |RESOLVED

--- Comment #6 from Andrew Pinski  ---
Dup.

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

[Bug libquadmath/114623] sqrtq and std::numeric_limits<__float128>::max()

2024-04-06 Thread g.peterhoff--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114623

--- Comment #4 from g.peterh...@t-online.de ---
That is precisely the design error of C/C++/etc. There should be no
float/double/long double/__float128/etc, but *only* floatN_t. Then there
wouldn't be these discrepancies (if necessary you have to emulate by SW).
But that's just my humble opinion ... and now we have to face reality and make
the best of it. 
One step might be to put std::float128_t and __float128 on a common/uniform
code base :-)

cu
Gero

[Bug gcov-profile/114601] ICE: SIGSEGV in hash_table_mod1 (hash-table.h:344) with -fcondition-coverage -finstrument-functions-once

2024-04-06 Thread zsojka at seznam dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114601

--- Comment #1 from Zdenek Sojka  ---
This is still failing as of r14-9822 (after the second PR114599#c7 fix).

[Bug middle-end/82014] worse code emitted for a valid memove than for undefined memcpy

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82014

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement

--- Comment #2 from Andrew Pinski  ---
Note for sizes that fit in a register, GCC does a reasonable job here. We could
do a better job if we know that which direction at compile time (like here) we
should do the copy. But currently we don't.

[Bug middle-end/81916] expansion of rint/nearbyint can simplified under -fno-signed-zeros

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81916

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement
 CC||pinskia at gcc dot gnu.org

[Bug libquadmath/114623] sqrtq and std::numeric_limits<__float128>::max()

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114623

--- Comment #3 from Andrew Pinski  ---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83800#c4

Basically libquadmath should be using sqrt128f if it exist for sqrtq instead of
doing a version itself ... But libquadmath is normally only used for Fortran
really ...

[Bug libquadmath/114623] sqrtq and std::numeric_limits<__float128>::max()

2024-04-06 Thread g.peterhoff--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114623

--- Comment #2 from g.peterh...@t-online.de ---
#include 
#include 
#include 
#include 
#include 
#include 
#include 

void print_hex(const std::float128_t value)
{
std::array
buffer{};
const std::to_chars_result
result{std::to_chars(buffer.data(),
buffer.data()+buffer.size(), value, std::chars_format::hex)};

std::cout << std::string_view{buffer.data(), result.ptr} << std::endl;
}

template 
voidprint_sqrt_max_hex()
{
using limits = std::numeric_limits;

print_hex(std::sqrt(limits::max()));
}

int main()
{
print_sqrt_max_hex();
print_sqrt_max_hex<__float128>();

return EXIT_SUCCESS;
}

gets
1.p+8191
1p+8192

[Bug libquadmath/114623] sqrt

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114623

--- Comment #1 from Andrew Pinski  ---
Please don't just link against godbolt and attach the preprocessed source.

[Bug libquadmath/114623] New: sqrt

2024-04-06 Thread g.peterhoff--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114623

Bug ID: 114623
   Summary: sqrt
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libquadmath
  Assignee: unassigned at gcc dot gnu.org
  Reporter: g.peterh...@t-online.de
  Target Milestone: ---

Hello,
sqrt does not work for std::numeric_limits<__float128>::max().
I have not checked other (special) values, perhaps the problem also occurs
there.

Please see https://godbolt.org/z/bx8or94v7

regards
Gero

[Bug c++/80670] Member specialization of alias declaration from different namespace

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80670

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||rejects-valid
 Status|WAITING |NEW

--- Comment #3 from Andrew Pinski  ---
Confirmed.

[Bug c++/88371] Gratuitous (?) warning regarding an implicit conversion in pointer arithmetic

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88371

Andrew Pinski  changed:

   What|Removed |Added

 CC||ian at geometrian dot com

--- Comment #5 from Andrew Pinski  ---
*** Bug 87129 has been marked as a duplicate of this bug. ***

[Bug c++/87129] -Wsign-conversion Erroneously Triggered When Dereferencing Pointer From Implicit User Conversion

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87129

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #1 from Andrew Pinski  ---
Dup.

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

[Bug c++/66586] Template backtrace is truncated/absent after 'template argument deduction/substitution failed:'

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66586

--- Comment #5 from Andrew Pinski  ---
(In reply to Andrew Pinski from comment #4)
> Dup.
> 
> *** This bug has been marked as a duplicate of bug 56842 ***

I should dup and fixed in GCC 9.1.0.

[Bug c++/56842] Argument deduction failure note is empty for alias template

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56842

Andrew Pinski  changed:

   What|Removed |Added

 CC||lucdanton at free dot fr

--- Comment #3 from Andrew Pinski  ---
*** Bug 66586 has been marked as a duplicate of this bug. ***

[Bug c++/66586] Template backtrace is truncated/absent after 'template argument deduction/substitution failed:'

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66586

Andrew Pinski  changed:

   What|Removed |Added

  Known to work||9.1.0
 Status|NEW |RESOLVED
  Known to fail||8.5.0
 Resolution|--- |DUPLICATE

--- Comment #4 from Andrew Pinski  ---
Dup.

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

[Bug c++/84358] error message (missing call to class contructor): misleading source code location

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84358

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed|2018-02-13 00:00:00 |2024-4-6

--- Comment #2 from Andrew Pinski  ---
EDG points to the opening `{` for the constructor:
```
"", line 14: error: no default constructor exists for class "A"
  B() : b(1) {};
 ^

```

[Bug c++/87063] Const subobject with const assignment operator, but operator anyway deleted

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87063

Andrew Pinski  changed:

   What|Removed |Added

   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=89305

--- Comment #2 from Andrew Pinski  ---
https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#253

[Bug c++/87063] Const subobject with const assignment operator, but operator anyway deleted

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87063

--- Comment #1 from Andrew Pinski  ---
EDG also rejects this:
```
"", line 21: error: function "foo::operator=(const foo &)" (declared
implicitly) cannot be referenced -- it is a deleted function
  a = foo();
^
```


I remember there being a defect report in this area too.

[Bug c++/87791] Unnecessary zero-initialization of constexpr unions in arrays

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87791

--- Comment #1 from Andrew Pinski  ---
Hmm,
GCC is acting treating `Arr a;` like `Arr a{};`. I have not looked into why
though.

[Bug modula2/114617] gm2 is unable to resolve const expression using relative operators ICE

2024-04-06 Thread gaius at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114617

Gaius Mulley  changed:

   What|Removed |Added

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

--- Comment #5 from Gaius Mulley  ---
Closing now that the patch has been applied.

[Bug c++/53251] template keyword ignored between -> and member under name collision with non-member

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53251

Andrew Pinski  changed:

   What|Removed |Added

 CC||ramon.garcia.f+gcc at gmail 
dot co
   ||m

--- Comment #4 from Andrew Pinski  ---
*** Bug 81526 has been marked as a duplicate of this bug. ***

[Bug c++/81526] In structure defined inside template function, template arguments inside the structure are not accepted to have template members.

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81526

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #2 from Andrew Pinski  ---
Dup. Fixed in GCC 7.2.0.

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

[Bug modula2/114617] gm2 is unable to resolve const expression using relative operators ICE

2024-04-06 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114617

--- Comment #4 from GCC Commits  ---
The master branch has been updated by Gaius Mulley :

https://gcc.gnu.org/g:4e3c8257304c55f2ebfb24bd6de3236bda0f054e

commit r14-9823-g4e3c8257304c55f2ebfb24bd6de3236bda0f054e
Author: Gaius Mulley 
Date:   Sat Apr 6 23:45:35 2024 +0100

PR modula2/114617 gm2 unable to resolve const expressions using relop ICE

This patch allows cc1gm2 to resolve constant expressions which use
relative operators.  Previous to the patch the result of a relop
was stored in a temporary variable set by an if then else quadruple
sequence.  This patch marks a const expression in the quadruples
and then reduces this sequence of quadruples into a single
assignment to an internal constant.

gcc/m2/ChangeLog:

PR modula2/114617
* gm2-compiler/M2GenGCC.mod (CodeStatememt): Add quad trace.
(ResolveConstantExpressions): Add parameter p to FoldIfLess,
FoldIfGre, FoldIfLessEqu, FoldIfGreEqu, FoldIfEqu, FoldIfNotEqu,
FoldIfIn and FoldIfNotIn.
(CodeInline): Add constExpr variable and pass it to GetQuadOtok.
(CodeReturnValue): Ditto.
(CodeParam): Ditto.
(FoldStringLength): Ditto.
(FoldStringConvertM2nul): Ditto.
(FoldStringConvertCnul): Ditto.
(DeclaredOperandsBecomes): Ditto.
(TypeCheckBecomes): Ditto.
(PerformFoldBecomes): Ditto.
(CodeBecomes): Ditto.
(CheckElementSetTypes): Ditto.
(CodeBinarySet): Ditto.
(PerformCodeIfLess): Ditto.
(PerformCodeIfGre): Ditto.
(PerformCodeIfLessEqu): Ditto.
(PerformCodeIfGreEqu): Ditto.
(PerformCodeIfEqu): Ditto.
(PerformCodeIfNotEqu): Ditto.
(IsValidExpressionRelOp): Ditto.
(PerformCodeIfIn): Ditto.
(PerformCodeIfNotIn): Ditto.
(CodeXIndr): Ditto.
(QuadCondition): New procedure function.
(IsBooleanRelOpPattern): Ditto.
(FoldBooleanRelopPattern): Ditto.
(FoldIfGre): Check for boolean relop constant expression and
add parameter p.
(FoldIfLessEqu): Ditto.
(FoldIfIn): Ditto.
(FoldIfEqu): Ditto.
(FoldIfNotIn): Ditto.
(FoldIfGreEqu): New procedure.
(FoldIfNotEqu): Ditto.
* gm2-compiler/M2Optimize.mod (ReduceBranch): Add constExpr
variable and pass it to GetQuadOtok.
* gm2-compiler/M2Quads.def (IsBecomes): New procedure function.
(IsDummy): Ditto.
(IsQuadConstExpr): Ditto.
(SetQuadConstExpr): Ditto.
(GetQuadDest): New procedure.
(GetQuadOp1): New procedure.
(GetQuadOp2): New procedure.
(GetQuadOp3): New procedure.
(GetQuadOtok): New procedure.
(GetQuadOTypetok): New procedure.
(PutQuadOtok): New procedure.
(IsInConstParameters): New procedure function.
* gm2-compiler/M2Quads.mod (IsBecomes): New procedure function.
(IsDummy): Ditto.
(IsQuadConstExpr): Ditto.
(SetQuadConstExpr): Ditto.
(GetQuadDest): New procedure.
(GetQuadOp1): New procedure.
(GetQuadOp2): New procedure.
(GetQuadOp3): New procedure.
(GetQuadOtok): New procedure.
(GetQuadOTypetok): New procedure.
(PutQuadOtok): New procedure.
(IsInConstParameters): New procedure function.
(ConstStack): Remove to ...
(ConstExprStack): ... this.
(ConstParamStack): New variable and initialize.
(QuadFrame): New field ConstExpr.
(GetQuadOtok): Add parameter constExpr and assign.
(PutQuadOtok): Add constExpr parameter and assign.
(PutQuadOType): Ditto.
(GetQuadOTypetok): Ditto.
(EraseQuad): Assign ConstExpr to FALSE.
(FoldSubrange): Set ConstExpr to FALSE in BecomesOp.
(PushInConstParameters): New procedure.
(PopInConstParameters): New procedure.
(IsInConstParameters): New procedure function.
* gm2-compiler/M2SymInit.mod (IssueConditional): Add
constExpr boolean variable.
(CheckReadBeforeInitQuad): Ditto.
(trashParam): Ditto.
* gm2-compiler/P3Build.bnf (ConstExpression): Call
PushInConstExpression and PopInConstExpression.
(ConstSetOrQualidentOrFunction): Call
PushInConstParameters and PopInConstParameters.
* gm2-compiler/PCBuild.bnf (ConstExpression): Call
PushInConstExpression and PopInConstExpression.
* gm2-compiler/PHBuild.bnf: Ditto
* gm2-gcc/m2expr.cc (m2expr_BuildCondIfExpression): New
  

[Bug c++/80594] error: ‘SDL_Window’ does not name a type

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80594

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #2 from Andrew Pinski  ---
https://stackoverflow.com/questions/12695719/sdl-window-does-not-name-a-type

Basically you are using the header files from SDL 1.x but the source you are
compiling is written against SDL 2.x.

Not a GCC Bug.

[Bug c++/77887] -Wimplicit-fallthrough fails to trigger in unused inline functions

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77887

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed||2024-04-06
 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW
   Severity|normal  |enhancement

--- Comment #3 from Andrew Pinski  ---
Confirmed.

[Bug c++/53341] overloaded operator delete(void *) appear in object file even when not directly used

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53341

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
   Target Milestone|--- |4.8.0
 Resolution|--- |FIXED

--- Comment #2 from Andrew Pinski  ---
Fixed in GCC 4.8. Tested even using the preprocessed source that was got from
4.7.0 which had the operator delete in the generated assembly.

[Bug target/114004] GCC emits a superfluous instruction for simple test case on ppc

2024-04-06 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114004

--- Comment #2 from Segher Boessenkool  ---
So, the rlwinm keeps all the top 32 bits intact, but those are all zero to
begin
with.  Somehow we don't see that, or don't take that into account anyway.

[Bug c/114622] New: memcmp -Wstringop-overread false positive

2024-04-06 Thread arnaud.lb at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114622

Bug ID: 114622
   Summary: memcmp -Wstringop-overread false positive
   Product: gcc
   Version: 13.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: arnaud.lb at gmail dot com
  Target Milestone: ---

The following code:

```
inline __attribute__((always_inline))
int g(const char *haystack, const char *needle, long unsigned int needle_len)
{
if (needle_len == 1 || needle_len == 0) {
return 0;
}
return __builtin_memcmp(needle, haystack, needle_len-2);
}

int f(const char *c) {
long unsigned int len = 1;
return g(c, "=", len);
}
```

Results in the following warning:

```
In function 'int g(const char*, const char*, long unsigned int)',
inlined from 'int f(const char*)' at :13:10:
:8:32: warning: 'int __builtin_memcmp(const void*, const void*, long
unsigned int)' specified bound 18446744073709551615 exceeds maximum object size
9223372036854775807 [-Wstringop-overread]
8 | return __builtin_memcmp(needle, haystack, needle_len-2);
  |^~~~
```

>From my understanding, the compiler knows needle_len to be in range [1,1] when
inlining g() in f(), but it also believes that line 8 (the memcmp call) is
feasible, so needle_len-2 is (uint64_t)1-2, which is 18446744073709551615.

Local gcc version 13.2.1 20240316 (Red Hat 13.2.1-7) (GCC) 

Reproducible since 12.x on godbolt

[Bug c++/105520] Ignores constraint in auto declaration with braced-init-list

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105520

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Blocks||67491
 Ever confirmed|0   |1
   Last reconfirmed||2024-04-06

--- Comment #2 from Andrew Pinski  ---
Confirmed.

This works as expected, in that we are getting the correct type for auto here:
```
#include 
#include 

template 
concept always_true = true;

template 
concept always_false = false;

template 
inline constexpr bool is_init_list_v = false;

template 
inline constexpr bool is_init_list_v> = true;

template 
concept not_init_list = !is_init_list_v>;
template 
inline constexpr bool not_init_list1 = !is_init_list_v>;


int main() {
auto f = {1, 2, 3};
static_assert(!not_init_list);
static_assert(!not_init_list1);
}
```


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
[Bug 67491] [meta-bug] concepts issues

[Bug c++/99925] Missing 'inconsistent deduction for ‘auto’' error when using type-constraint placeholder

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99925

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|UNCONFIRMED |RESOLVED

--- Comment #1 from Andrew Pinski  ---
Dup.

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

[Bug c++/81270] [concepts] ill-formed code with a constrained variable declaration with multiple declarators with different deduced types not rejected

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81270

Andrew Pinski  changed:

   What|Removed |Added

 CC||hewillk at gmail dot com

--- Comment #3 from Andrew Pinski  ---
*** Bug 99925 has been marked as a duplicate of this bug. ***

[Bug c++/81270] [concepts] ill-formed code with a constrained variable declaration with multiple declarators with different deduced types not rejected

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81270

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed|2019-10-15 00:00:00 |2024-4-6

--- Comment #2 from Andrew Pinski  ---
Without the concept on the auto line GCC correctly rejects it:
```
:3:1: error: inconsistent deduction for 'auto': 'int' and then
'std::nullptr_t'
3 | auto v1 = 1, v2 = nullptr;  // Ill-formed.
  | ^~~~
```

[Bug c++/80438] Variadic template class argument deduction failure from variadic constructor deduction guide

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80438

Andrew Pinski  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |10.2

--- Comment #3 from Andrew Pinski  ---
Most likely fixed by r11-1571-g57b4daf8dc4ed7b6. (which was backported to GCC
10.2.0 also).

[Bug c++/90137] Using declaration (constructor inheritance) prevents overriding

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90137

Andrew Pinski  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #3 from Andrew Pinski  ---
so the reasoning is because we need to cleanup the partial initialized object.

GCC is correct in rejecting this here and clang and other compilers have same
behavior even.

[Bug target/114621] [11/12/13/14 Regression] ICE: in extract_insn, at recog.cc:2812 (unrecognizable insn) with -O -fpie and _Thread_local with large offset

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114621

Andrew Pinski  changed:

   What|Removed |Added

  Known to fail||4.6.4
Summary|ICE: in extract_insn, at|[11/12/13/14 Regression]
   |recog.cc:2812   |ICE: in extract_insn, at
   |(unrecognizable insn) with  |recog.cc:2812
   |-O -fpie and _Thread_local  |(unrecognizable insn) with
   |with large offset   |-O -fpie and _Thread_local
   ||with large offset
 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2024-04-06
   Target Milestone|--- |11.5

--- Comment #1 from Andrew Pinski  ---
This didn't ICE in GCC 4.5.4 but it produced assembly which would almost
definitely not link:
movzbl  34359738367+b@tpoff(%rax), %eax

[Bug target/114621] New: ICE: in extract_insn, at recog.cc:2812 (unrecognizable insn) with -O -fpie and _Thread_local with large offset

2024-04-06 Thread zsojka at seznam dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114621

Bug ID: 114621
   Summary: ICE: in extract_insn, at recog.cc:2812 (unrecognizable
insn) with -O -fpie and _Thread_local with large
offset
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: zsojka at seznam dot cz
  Target Milestone: ---
  Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu

Created attachment 57893
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57893=edit
reduced testcase

Compiler output:
$ x86_64-pc-linux-gnu-gcc -O -fpie testcase.c
testcase.c: In function 'foo':
testcase.c:8:1: error: unrecognizable insn:
8 | }
  | ^
(insn 6 5 7 2 (set (reg:DI 106)
(const:DI (plus:DI (unspec:DI [
(symbol_ref:DI ("b") [flags 0x2a] )
] UNSPEC_NTPOFF)
(const_int 34359738367 [0x7] "testcase.c":7:10 -1
 (nil))
during RTL pass: vregs
testcase.c:8:1: internal compiler error: in extract_insn, at recog.cc:2812
0x80873f _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
/repo/gcc-trunk/gcc/rtl-error.cc:108
0x8087bc _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
/repo/gcc-trunk/gcc/rtl-error.cc:116
0x7f762b extract_insn(rtx_insn*)
/repo/gcc-trunk/gcc/recog.cc:2812
0x11329cd instantiate_virtual_regs_in_insn
/repo/gcc-trunk/gcc/function.cc:1612
0x11329cd instantiate_virtual_regs
/repo/gcc-trunk/gcc/function.cc:1995
0x11329cd execute
/repo/gcc-trunk/gcc/function.cc:2042
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.

$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r14-9803-20240405111321-g9ab8fdfeef5-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/14.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--disable-bootstrap --with-cloog --with-ppl --with-isl
--build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --enable-libsanitizer
--disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r14-9803-20240405111321-g9ab8fdfeef5-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240405 (experimental) (GCC)

[Bug rtl-optimization/114415] [13 Regression] wrong code with -Oz -fno-dce -fno-forward-propagate -flive-range-shrinkage -fweb since r13-1826

2024-04-06 Thread law at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114415

--- Comment #9 from Jeffrey A. Law  ---
Yea.  I think my first one in this space was in the mid 90s on the PA.  Sigh.

[Bug ada/114593] [11/12/13/14 regression] bogus error on type conversion in instantiation of child unit inside generic child unit

2024-04-06 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114593

Eric Botcazou  changed:

   What|Removed |Added

   Last reconfirmed||2024-04-06
 CC||ebotcazou at gcc dot gnu.org
 Ever confirmed|0   |1
Summary|Failed type conversion on   |[11/12/13/14 regression]
   |non-tagged derived type |bogus error on type
   |inside a generic unit   |conversion in instantiation
   ||of child unit inside
   ||generic child unit
 Status|UNCONFIRMED |NEW

--- Comment #1 from Eric Botcazou  ---
Confirmed, the compiler is probably a bit lost here...

[Bug c++/114620] New: Pointer-to-member template argument which is the member of a base class is rejected

2024-04-06 Thread mital at mitalashok dot co.uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114620

Bug ID: 114620
   Summary: Pointer-to-member template argument which is the
member of a base class is rejected
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mital at mitalashok dot co.uk
  Target Milestone: ---

The following is incorrectly rejected:

struct Base {
int x;
};
struct Derived : Base {
int y;
};
template struct X;

// error: '::x' is not a valid template argument for type 'int
Derived::*'
using T1 = X<::x>;
//   ^~~
// note: because it is a member of 'Base'

constexpr int Derived::* pm = ::x;
// error: '0' is not a valid template argument for type 'int Derived::*'
using T2 = X;
// ^
// note: it must be a pointer-to-member of the form '::Y'

And replacing `::x` with `::y` works. The same problems happen
with pointer-to-member-functions instead of pointers to data members.

This seems similar to Bug 104678

[Bug c++/114619] New: [14 regression] ICE with -fno-elide-constructors in C++14 mode for non-constant initializer in array new

2024-04-06 Thread mital at mitalashok dot co.uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114619

Bug ID: 114619
   Summary: [14 regression] ICE with -fno-elide-constructors in
C++14 mode for non-constant initializer in array new
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mital at mitalashok dot co.uk
  Target Milestone: ---

:

struct X {
/*constexpr*/ X(const X&) {}
};

extern X x;

int main() {
new X[1]{x};
}

Compiled with `-std=c++14 -fno-elide-constructors` gives an internal compiler
error:

test.cpp: In function ‘int main()’:
test.cpp:8:14: internal compiler error: in cp_gimplify_expr, at
cp/cp-gimplify.cc:904
8 | new X[1]{x};
  |  ^
0x781b7d cp_gimplify_expr(tree_node**, gimple**, gimple**)
./gcc/gcc/cp/cp-gimplify.cc:904
0x104c159 gimplify_expr(tree_node**, gimple**, gimple**, bool
(*)(tree_node*), int)
./gcc/gcc/gimplify.cc:17788
0x10577ef gimplify_addr_expr
./gcc/gcc/gimplify.cc:6910
0x104dca0 gimplify_expr(tree_node**, gimple**, gimple**, bool
(*)(tree_node*), int)
./gcc/gcc/gimplify.cc:17929
0x105c9b3 gimplify_expr
./gcc/gcc/gimplify.cc:18951
0x105c9b3 gimplify_arg(tree_node**, gimple**, unsigned int, bool)
./gcc/gcc/gimplify.cc:3778
0x105d599 gimplify_call_expr
./gcc/gcc/gimplify.cc:4063
0x104d280 gimplify_expr(tree_node**, gimple**, gimple**, bool
(*)(tree_node*), int)
./gcc/gcc/gimplify.cc:17851
0x10504ba gimplify_stmt(tree_node**, gimple**)
./gcc/gcc/gimplify.cc:7576
0x104e3ab gimplify_statement_list
./gcc/gcc/gimplify.cc:2249
0x104e3ab gimplify_expr(tree_node**, gimple**, gimple**, bool
(*)(tree_node*), int)
./gcc/gcc/gimplify.cc:18327
0x105eaf7 gimplify_stmt(tree_node**, gimple**)
./gcc/gcc/gimplify.cc:7576
0x105eaf7 gimplify_compound_expr
./gcc/gcc/gimplify.cc:6761
0x105eba1 gimplify_compound_expr
./gcc/gcc/gimplify.cc:6759
0x104d440 gimplify_expr(tree_node**, gimple**, gimple**, bool
(*)(tree_node*), int)
./gcc/gcc/gimplify.cc:17872
0x104d157 gimplify_stmt(tree_node**, gimple**)
./gcc/gcc/gimplify.cc:7576
0x104d157 gimplify_cleanup_point_expr
./gcc/gcc/gimplify.cc:7314
0x104d157 gimplify_expr(tree_node**, gimple**, gimple**, bool
(*)(tree_node*), int)
./gcc/gcc/gimplify.cc:18275
0x10504ba gimplify_stmt(tree_node**, gimple**)
./gcc/gcc/gimplify.cc:7576
0x104e3ab gimplify_statement_list
./gcc/gcc/gimplify.cc:2249
Please submit a full bug report, with preprocessed source.
Please include the complete backtrace with any bug report.
See  for instructions.


git bisect shows this starts happening with
6ffbf87ca66f4ed9cd79cff675fabe2109e46e85

[Bug target/114590] [14 Regression] FAIL: gcc.target/i386/apx-ndd-ti-shift.c (test for excess errors)

2024-04-06 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114590

H.J. Lu  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED

--- Comment #5 from H.J. Lu  ---
Fixed.

[Bug libfortran/114618] Format produces incorrect output when contains 1x, ok when uses " "

2024-04-06 Thread jvdelisle at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114618

Jerry DeLisle  changed:

   What|Removed |Added

 CC||jvdelisle at gcc dot gnu.org

--- Comment #2 from Jerry DeLisle  ---
Possibly a dup. I will try to get a closer look later today.

[Bug libfortran/114304] [13/14 Regression] libgfortran I/O – bogus "Semicolon not allowed as separator with DECIMAL='point'"

2024-04-06 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114304

--- Comment #22 from GCC Commits  ---
The master branch has been updated by Jerry DeLisle :

https://gcc.gnu.org/g:93adf88cc6744aa2c732b765e1e3b96e66cb3300

commit r14-9822-g93adf88cc6744aa2c732b765e1e3b96e66cb3300
Author: Jerry DeLisle 
Date:   Fri Apr 5 19:25:13 2024 -0700

libfortran: Fix handling of formatted separators.

PR libfortran/114304
PR libfortran/105473

libgfortran/ChangeLog:

* io/list_read.c (eat_separator): Add logic to handle spaces
preceding a comma or semicolon such that that a 'null' read
occurs without error at the end of comma or semicolon
terminated input lines. Add check and error message for ';'.
(list_formatted_read_scalar): Treat comma as a decimal point
when specified by the decimal mode on the first item.

gcc/testsuite/ChangeLog:

* gfortran.dg/pr105473.f90: Modify to verify new error message.
* gfortran.dg/pr114304.f90: New test.

[Bug fortran/105473] semicolon allowed when list-directed read integer with decimal='point'

2024-04-06 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105473

--- Comment #38 from GCC Commits  ---
The master branch has been updated by Jerry DeLisle :

https://gcc.gnu.org/g:93adf88cc6744aa2c732b765e1e3b96e66cb3300

commit r14-9822-g93adf88cc6744aa2c732b765e1e3b96e66cb3300
Author: Jerry DeLisle 
Date:   Fri Apr 5 19:25:13 2024 -0700

libfortran: Fix handling of formatted separators.

PR libfortran/114304
PR libfortran/105473

libgfortran/ChangeLog:

* io/list_read.c (eat_separator): Add logic to handle spaces
preceding a comma or semicolon such that that a 'null' read
occurs without error at the end of comma or semicolon
terminated input lines. Add check and error message for ';'.
(list_formatted_read_scalar): Treat comma as a decimal point
when specified by the decimal mode on the first item.

gcc/testsuite/ChangeLog:

* gfortran.dg/pr105473.f90: Modify to verify new error message.
* gfortran.dg/pr114304.f90: New test.

[Bug go/106813] getSiginfo() libgo/runtime/go-signal.c missing Solaris specific code to get ret.sigpc

2024-04-06 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106813

Eric Botcazou  changed:

   What|Removed |Added

 CC||ebotcazou at gcc dot gnu.org
 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2024-04-06

[Bug ada/114550] Weird error when iterating over a character container

2024-04-06 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114550

Eric Botcazou  changed:

   What|Removed |Added

 CC||ebotcazou at gcc dot gnu.org
   Target Milestone|--- |14.0
 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED
Summary|Weird error when iterating  |Weird error when iterating
   |over a character container. |over a character container

--- Comment #1 from Eric Botcazou  ---
Confirmed in GCC 13.x but fixed on the mainline.

[Bug rtl-optimization/114415] [13 Regression] wrong code with -Oz -fno-dce -fno-forward-propagate -flive-range-shrinkage -fweb since r13-1826

2024-04-06 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114415

Eric Botcazou  changed:

   What|Removed |Added

 CC||ebotcazou at gcc dot gnu.org

--- Comment #8 from Eric Botcazou  ---
> It probably would have been enough to avoid the RISC-V bug I just fixed a
> week or so ago.

As well as numerous similar bugs for various architectures over the last couple
of decades!

[Bug target/114590] [14 Regression] FAIL: gcc.target/i386/apx-ndd-ti-shift.c (test for excess errors)

2024-04-06 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114590

--- Comment #4 from GCC Commits  ---
The master branch has been updated by H.J. Lu :

https://gcc.gnu.org/g:06a7e7514af67d9f3c51fe7a592b5166da791e2f

commit r14-9820-g06a7e7514af67d9f3c51fe7a592b5166da791e2f
Author: H.J. Lu 
Date:   Fri Apr 5 08:56:15 2024 -0700

x86: Use explicit shift count in double-precision shifts

Don't use implicit shift count in double-precision shifts in AT syntax
since they aren't in Intel SDM.  Keep the 's' modifier for backward
compatibility with inline asm statements.

PR target/114590
* config/i386/i386.md (x86_64_shld): Use explicit shift count in
AT syntax.
(x86_64_shld_ndd): Likewise.
(x86_shld): Likewise.
(x86_shld_ndd): Likewise.
(x86_64_shrd): Likewise.
(x86_64_shrd_ndd): Likewise.
(x86_shrd): Likewise.
(x86_shrd_ndd): Likewise.

[Bug ada/114065] gnat build with -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 fails on 32bit archs

2024-04-06 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114065

--- Comment #17 from Eric Botcazou  ---
Nice work indeed, in an area that clearly needed it, thanks!

Something potentially problematic though:

+package body System.CRTL is
+
+   --  In GNAT, Duration'Size = 64.
+   function Duration_To_int64 is new Ada.Unchecked_Conversion
+ (Duration, int64);

That's not universal, see Targparm:

   -
   -- Duration Format --
   -

   --  By default, type Duration is a 64-bit fixed-point type with a delta
   --  and small of 10**(-9) (i.e. it is a count in nanoseconds). This flag
   --  allows that standard format to be modified.

   Duration_32_Bits_On_Target : Boolean := False;
   --  If True, then Duration is represented in 32 bits and the delta and
   --  small values are set to 20.0*(10**(-3)) (i.e. it is a count in units
   --  of 20 milliseconds).

although Duration_32_Bit is indeed False in all the system-*.ads files.

[Bug gcov-profile/114599] [14 Regression] ICE: SIGSEGV in bitmap_set_bit(bitmap_head*, int) (bitmap.cc:975) with -O2 -fcondition-coverage

2024-04-06 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114599

--- Comment #7 from GCC Commits  ---
The master branch has been updated by J?rgen Kvalsvik :

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

commit r14-9819-gc6892a430a9752aea167265621c3ae7a3e11159f
Author: Jørgen Kvalsvik 
Date:   Fri Apr 5 21:42:07 2024 +0200

Copy condition->expr map when inlining [PR114599]

When a function is tree-inlined, copy the condition -> expression mapping
from the inlined function into the caller, shifted so uids are not
mixed.  Tree inlining was always problematic under condition coverage -
either through a nullptr dereference (triggered by the test case), or
through quietly mixing caller conditions with the callee conditions.

PR middle-end/114599

gcc/ChangeLog:

* tree-inline.cc (add_local_variables): Copy cond_uids mappings.

gcc/testsuite/ChangeLog:

* gcc.misc-tests/gcov-pr114599.c: New test.

[Bug fortran/113363] ICE on ASSOCIATE and unlimited polymorphic function

2024-04-06 Thread pault at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113363

--- Comment #7 from Paul Thomas  ---
Created attachment 57892
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57892=edit
Fix for this PR

The attachment has two fixes for the PR :-)

The first chunk in trans-array.cc is an  alternative to the direct, rather
brutal chunk in trans-stmt.cc. The latter, though, isolates the fix to allocate
statements. I am not entirely sure which is better.

It needs some comments and a proper testcase.

Cheers

Paul

[Bug fortran/89925] [11 Regression] Wrong array bounds from ALLOCATE with SOURCE or MOLD

2024-04-06 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89925

anlauf at gcc dot gnu.org changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|WAITING |RESOLVED

--- Comment #17 from anlauf at gcc dot gnu.org ---
Backported as r11-11310-gb755a7af1f2ef1:

commit b755a7af1f2ef1f5348d04db20f751e898abcd9d
Author: Chung-Lin Tang 
Date:   Fri Dec 3 17:27:17 2021 +0800

fortran: Fix setting of array lower bound for named arrays

This patch fixes a case of setting array low-bounds, found for particular
uses
of SOURCE=/MOLD=. This adjusts the relevant part in gfc_trans_allocate() to
set e3_has_nodescriptor only for non-named arrays.

2021-12-03  Tobias Burnus  

gcc/fortran/ChangeLog:

* trans-stmt.c (gfc_trans_allocate): Set e3_has_nodescriptor to
true
only for non-named arrays.

gcc/testsuite/ChangeLog:

* gfortran.dg/allocate_with_source_26.f90: Adjust testcase.
* gfortran.dg/allocate_with_mold_4.f90: New testcase.

(cherry picked from commit 6262e3a22b3d86afc116480bc59a7bb30b0cfd40)


Closing.

[Bug libfortran/114618] Format produces incorrect output when contains 1x, ok when uses " "

2024-04-06 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114618

anlauf at gcc dot gnu.org changed:

   What|Removed |Added

  Component|fortran |libfortran
   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=109358

--- Comment #1 from anlauf at gcc dot gnu.org ---
Likely a dup of pr109358.

[Bug modula2/114617] gm2 is unable to resolve const expression using relative operators ICE

2024-04-06 Thread gaius at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114617

--- Comment #3 from Gaius Mulley  ---
With the patch the reported failure examples above pass:

$ gm2 -g -c BasicFileSys.mod
-I../../../../Sandpit/gm2-outside-tree-tests/build/source/m2pp/src/ -fsources
Compiling: BasicFileSys.mod
Pass 0: lexical analysis, parsing, modules and associated filenames
   Module SYSTEM   :
/home/gaius/opt/lib/gcc/x86_64-pc-linux-gnu/14.0.1/m2/m2cor/SYSTEM.def [m2cor]
   Module M2RTS:
/home/gaius/opt/lib/gcc/x86_64-pc-linux-gnu/14.0.1/m2/m2pim/M2RTS.def [m2pim]
   Module RTExceptions :
/home/gaius/opt/lib/gcc/x86_64-pc-linux-gnu/14.0.1/m2/m2pim/RTExceptions.def
[m2pim]
   Module BasicFileSys :
../../../../Sandpit/gm2-outside-tree-tests/build/source/m2pp/src/BasicFileSys.def
   Module BasicFileSys : BasicFileSys.mod
   Module COROUTINES   :
/home/gaius/opt/lib/gcc/x86_64-pc-linux-gnu/14.0.1/m2/m2pim/COROUTINES.def
[m2pim] (for C)
   Module Size : ./Size.def
   Module stat : ./stat.def
   Module stdio: ./stdio.def (for C)
   Module unistd   : ./unistd.def (for C)
   Module fcntl: ./fcntl.def (for C)
   Module stat0: ./stat0.def (for C)
   Module SysTypes : ./SysTypes.def
Pass 1: scopes, enumerated types, imports and exports
Pass 2: constants and types
Pass C: aggregate constants
Pass 3: quadruple generation
Pass 4: gcc tree generation
symbols to gcc trees
statements to gcc trees
gcc trees given to the gcc backend

and

$ gm2 -c -fiso constbool3.mod

[Bug c++/65685] Reducing alignment with alignas should be rejected

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65685

--- Comment #8 from Andrew Pinski  ---
*** Bug 69571 has been marked as a duplicate of this bug. ***

[Bug c++/58601] [meta-bug] alignas

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58601
Bug 58601 depends on bug 69571, which changed state.

Bug 69571 Summary: [C++11] invalid alignas on a typedef accepted, reduces 
alignment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69571

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

[Bug c++/69571] [C++11] invalid alignas on a typedef accepted, reduces alignment

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69571

Andrew Pinski  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #4 from Andrew Pinski  ---
Dup.

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

[Bug c++/65055] Types and variables differ in handling of multiple instances of attribute aligned/alignas

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65055

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|NEW |RESOLVED

--- Comment #3 from Andrew Pinski  ---
Dup.

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

[Bug c++/64236] [c++11] last alignas overrides stricter on a class definition

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64236

Andrew Pinski  changed:

   What|Removed |Added

 CC||hstong at ca dot ibm.com

--- Comment #8 from Andrew Pinski  ---
*** Bug 65055 has been marked as a duplicate of this bug. ***

[Bug c++/65055] Types and variables differ in handling of multiple instances of attribute aligned/alignas

2024-04-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65055

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed|2018-09-14 00:00:00 |2024-4-6
Summary|Types and variables differ  |Types and variables differ
   |in handling of multiple |in handling of multiple
   |instances of attribute  |instances of attribute
   |aligned |aligned/alignas

--- Comment #2 from Andrew Pinski  ---
Confirmed even using standard C++11 style attributes/alingof fails:
```
struct alignas(32) alignas(16) A {} ;

extern int x alignas(32) alignas(16);

extern int chk[32];
extern int chk[alignof(struct A)];
```

Which works with clang, MSVC and EDG.