[Bug c/113492] [14 Regression] ICE: in composite_type_internal, at c/c-typeck.cc:557 with -std=c2x -funsigned-bitfields since r14-6808

2024-01-20 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113492

--- Comment #6 from uecker at gcc dot gnu.org ---

The point is that no existing code is broken by this because it was rejected
previously and now this only affects very new C23 code using bit-fields in
different structs that a declared in different ways and then only when using
together -funsigned-bitfields. So it is an obscure corner case of an obscure
corner case... 

But I will fix it anyway, soon I was just wondering why many similar bugs have
a different rating... If this is just because nobody came around to categorize
it, this makes sense.

[Bug c/113492] [14 Regression] ICE: in composite_type_internal, at c/c-typeck.cc:557 with -std=c2x -funsigned-bitfields since r14-6808

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113492

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code

--- Comment #5 from Andrew Pinski  ---
(In reply to uecker from comment #4)
> Yes, it is just weird because similar bugs for other new language features,
> e.g. an ICE for BitInt are not labeled as a regression and are P3.

-std=c2x is not a "new feature" in GCC 14 though, it was there in GCC 13. What
is a new feature is "constructing composite types for structs and unions" but
those rules might not be known by many users so it is only new feature
internally.

Also P3 just means not categorized yet; I forgot where that is documented.

[Bug c/113492] [14 Regression] ICE: in composite_type_internal, at c/c-typeck.cc:557 with -std=c2x -funsigned-bitfields since r14-6808

2024-01-20 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113492

--- Comment #4 from uecker at gcc dot gnu.org ---

Yes, it is just weird because similar bugs for other new language features,
e.g. an ICE for BitInt are not labeled as a regression and are P3.

[Bug c/113492] [14 Regression] ICE: in composite_type_internal, at c/c-typeck.cc:557 with -std=c2x -funsigned-bitfields since r14-6808

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

--- Comment #3 from Zdenek Sojka  ---
(In reply to uecker from comment #2)
> 
> I agree that "int:3" with -funsigned-bitfields should produce a type which
> is compatible to one  with "unsigned:3" and that forming a composite type
> has to work.
> 
> I am not entirely sure this should be considered a regression as this C23
> feature did not exist before (but was rejected and did not ICE).  Anyway, I
> will look at this and post a patch. Thanks for reporting.

Thank you for having a look.

The "regression" part is for the ICEing.

[Bug c/113492] [14 Regression] ICE: in composite_type_internal, at c/c-typeck.cc:557 with -std=c2x -funsigned-bitfields since r14-6808

2024-01-19 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113492

uecker at gcc dot gnu.org changed:

   What|Removed |Added

 CC||uecker at gcc dot gnu.org

--- Comment #2 from uecker at gcc dot gnu.org ---


I agree that "int:3" with -funsigned-bitfields should produce a type which is
compatible to one  with "unsigned:3" and that forming a composite type has to
work.

I am not entirely sure this should be considered a regression as this C23
feature did not exist before (but was rejected and did not ICE).  Anyway, I
will look at this and post a patch. Thanks for reporting.

[Bug c/113492] [14 Regression] ICE: in composite_type_internal, at c/c-typeck.cc:557 with -std=c2x -funsigned-bitfields since r14-6808

2024-01-19 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113492

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1
   Last reconfirmed||2024-01-19
 CC||jakub at gcc dot gnu.org
   Priority|P3  |P1
Summary|[14 Regression] ICE: in |[14 Regression] ICE: in
   |composite_type_internal, at |composite_type_internal, at
   |c/c-typeck.cc:557 with  |c/c-typeck.cc:557 with
   |-std=c2x|-std=c2x
   |-funsigned-bitfields|-funsigned-bitfields since
   ||r14-6808

--- Comment #1 from Jakub Jelinek  ---
Started with r14-6808-g8c8d4b565cd7e08c6ec9ca5a4369d8ec5619cad8

[Bug c/113492] [14 Regression] ICE: in composite_type_internal, at c/c-typeck.cc:557 with -std=c2x -funsigned-bitfields

2024-01-19 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113492

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |14.0