public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/93573] [8/9/10 Regression] internal compiler error: in force_constant_size, at gimplify.c:733
       [not found] <bug-93573-4@http.gcc.gnu.org/bugzilla/>
@ 2020-03-20  8:34 ` rguenth at gcc dot gnu.org
  2020-03-27 16:40 ` jakub at gcc dot gnu.org
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-03-20  8:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93573

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |8.5
           Priority|P3                          |P4

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c/93573] [8/9/10 Regression] internal compiler error: in force_constant_size, at gimplify.c:733
       [not found] <bug-93573-4@http.gcc.gnu.org/bugzilla/>
  2020-03-20  8:34 ` [Bug c/93573] [8/9/10 Regression] internal compiler error: in force_constant_size, at gimplify.c:733 rguenth at gcc dot gnu.org
@ 2020-03-27 16:40 ` jakub at gcc dot gnu.org
  2020-03-27 18:02 ` jakub at gcc dot gnu.org
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-27 16:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93573

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Reduced testcase:
void bar ();

void
foo (char a)
{
  union C { int d[100.0]; char *e; };
  bar ((union C) &a);
}

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c/93573] [8/9/10 Regression] internal compiler error: in force_constant_size, at gimplify.c:733
       [not found] <bug-93573-4@http.gcc.gnu.org/bugzilla/>
  2020-03-20  8:34 ` [Bug c/93573] [8/9/10 Regression] internal compiler error: in force_constant_size, at gimplify.c:733 rguenth at gcc dot gnu.org
  2020-03-27 16:40 ` jakub at gcc dot gnu.org
@ 2020-03-27 18:02 ` jakub at gcc dot gnu.org
  2020-03-27 18:04 ` jakub at gcc dot gnu.org
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-27 18:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93573

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P4                          |P2

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c/93573] [8/9/10 Regression] internal compiler error: in force_constant_size, at gimplify.c:733
       [not found] <bug-93573-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2020-03-27 18:02 ` jakub at gcc dot gnu.org
@ 2020-03-27 18:04 ` jakub at gcc dot gnu.org
  2020-03-28  9:31 ` cvs-commit at gcc dot gnu.org
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-27 18:04 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93573

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 48135
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48135&action=edit
gcc10-pr93573.patch

For the error-recovery ICE, we can just make sure that after errors the type
isn't assumed to be VLA.

Unfortunately:
void bar ();

void
foo (char a, int b)
{
  union C { int d[b]; char *e; };
  bar ((union C) &a);
}

still ICEs.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c/93573] [8/9/10 Regression] internal compiler error: in force_constant_size, at gimplify.c:733
       [not found] <bug-93573-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2020-03-27 18:04 ` jakub at gcc dot gnu.org
@ 2020-03-28  9:31 ` cvs-commit at gcc dot gnu.org
  2020-03-28  9:35 ` jakub at gcc dot gnu.org
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-03-28  9:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93573

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

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

commit r10-7438-gc6a562de88c44a555e1688c212869b20b02151bc
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Sat Mar 28 10:30:31 2020 +0100

    c: After issuing errors about array size, for error-recovery don't make the
array VLA [PR93573]

    After we report various errors about array size, we set for error-recovery
    the size to be 1, but because size_int_const is false, it still means we
    pretend the array is a VLA, can emit a second diagnostics in that case etc.
    E.g.
    $ ./cc1.unpatched -quiet a.c
    a.c:1:5: error: size of array âfâ has non-integer type
        1 | int f[100.0];
          |     ^
    a.c:1:1: warning: variably modified âfâ at file scope
        1 | int f[100.0];
          | ^~~
    $ ./cc1 -quiet a.c
    a.c:1:5: error: size of array âfâ has non-integer type
        1 | int f[100.0];
          |     ^

    2020-03-28  Jakub Jelinek  <jakub@redhat.com>

            PR c/93573
            * c-decl.c (grokdeclarator): After issuing errors, set
size_int_const
            to true after setting size to integer_one_node.

            * gcc.dg/pr93573-1.c: New test.
            * gcc.dg/pr93573-2.c: New test.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c/93573] [8/9/10 Regression] internal compiler error: in force_constant_size, at gimplify.c:733
       [not found] <bug-93573-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2020-03-28  9:31 ` cvs-commit at gcc dot gnu.org
@ 2020-03-28  9:35 ` jakub at gcc dot gnu.org
  2020-03-30 23:22 ` joseph at codesourcery dot com
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-28  9:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93573

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed the error-recovery bug on the trunk, but the ice on the #c4 testcase is
still there (and the question is if it is valid or not).  If it is valid,
probably the FE or gimplifier needs to turn that cast to VLA union into
creation of a VLA temporary and assigning the cast operand into the right field
of it.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c/93573] [8/9/10 Regression] internal compiler error: in force_constant_size, at gimplify.c:733
       [not found] <bug-93573-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2020-03-28  9:35 ` jakub at gcc dot gnu.org
@ 2020-03-30 23:22 ` joseph at codesourcery dot com
  2021-05-14  9:52 ` [Bug c/93573] [9/10/11/12 " jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: joseph at codesourcery dot com @ 2020-03-30 23:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93573

--- Comment #7 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
Passing a variable-size struct or union by value to a non-nested function 
seems very questionable (the function couldn't be declared with a matching 
prototype), but perhaps that doesn't answer the question because the 
cast-to-union case might appear for a nested function as well.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c/93573] [9/10/11/12 Regression] internal compiler error: in force_constant_size, at gimplify.c:733
       [not found] <bug-93573-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2020-03-30 23:22 ` joseph at codesourcery dot com
@ 2021-05-14  9:52 ` jakub at gcc dot gnu.org
  2021-06-01  8:16 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-05-14  9:52 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93573

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|8.5                         |9.4

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 8 branch is being closed.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c/93573] [9/10/11/12 Regression] internal compiler error: in force_constant_size, at gimplify.c:733
       [not found] <bug-93573-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2021-05-14  9:52 ` [Bug c/93573] [9/10/11/12 " jakub at gcc dot gnu.org
@ 2021-06-01  8:16 ` rguenth at gcc dot gnu.org
  2022-05-27  9:42 ` [Bug c/93573] [10/11/12/13 " rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-01  8:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93573

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.4                         |9.5

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9.4 is being released, retargeting bugs to GCC 9.5.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c/93573] [10/11/12/13 Regression] internal compiler error: in force_constant_size, at gimplify.c:733
       [not found] <bug-93573-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2021-06-01  8:16 ` rguenth at gcc dot gnu.org
@ 2022-05-27  9:42 ` rguenth at gcc dot gnu.org
  2022-06-28 10:39 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27  9:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93573

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.5                         |10.4

--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9 branch is being closed

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c/93573] [10/11/12/13 Regression] internal compiler error: in force_constant_size, at gimplify.c:733
       [not found] <bug-93573-4@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2022-05-27  9:42 ` [Bug c/93573] [10/11/12/13 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:39 ` jakub at gcc dot gnu.org
  2023-07-07 10:36 ` [Bug c/93573] [11/12/13/14 " rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:39 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93573

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.4                        |10.5

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c/93573] [11/12/13/14 Regression] internal compiler error: in force_constant_size, at gimplify.c:733
       [not found] <bug-93573-4@http.gcc.gnu.org/bugzilla/>
                   ` (10 preceding siblings ...)
  2022-06-28 10:39 ` jakub at gcc dot gnu.org
@ 2023-07-07 10:36 ` rguenth at gcc dot gnu.org
  2024-02-20  7:36 ` pinskia at gcc dot gnu.org
  2024-02-20  7:43 ` jakub at gcc dot gnu.org
  13 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 10:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93573

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.5                        |11.5

--- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10 branch is being closed.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c/93573] [11/12/13/14 Regression] internal compiler error: in force_constant_size, at gimplify.c:733
       [not found] <bug-93573-4@http.gcc.gnu.org/bugzilla/>
                   ` (11 preceding siblings ...)
  2023-07-07 10:36 ` [Bug c/93573] [11/12/13/14 " rguenth at gcc dot gnu.org
@ 2024-02-20  7:36 ` pinskia at gcc dot gnu.org
  2024-02-20  7:43 ` jakub at gcc dot gnu.org
  13 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-20  7:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93573

--- Comment #13 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #6)
> Fixed the error-recovery bug on the trunk, but the ice on the #c4 testcase
> is still there (and the question is if it is valid or not).  If it is valid,
> probably the FE or gimplifier needs to turn that cast to VLA union into
> creation of a VLA temporary and assigning the cast operand into the right
> field of it.

Hmm, is the testcase in comment #4 a regression though? It ICEs even in the
same way in GCC 4.1.2 all the way to the trunk including GCC 7.3.0.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c/93573] [11/12/13/14 Regression] internal compiler error: in force_constant_size, at gimplify.c:733
       [not found] <bug-93573-4@http.gcc.gnu.org/bugzilla/>
                   ` (12 preceding siblings ...)
  2024-02-20  7:36 ` pinskia at gcc dot gnu.org
@ 2024-02-20  7:43 ` jakub at gcc dot gnu.org
  13 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-02-20  7:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93573

--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #13)
> Hmm, is the testcase in comment #4 a regression though? It ICEs even in the
> same way in GCC 4.1.2 all the way to the trunk including GCC 7.3.0.

It is.  gcc 3.2, 3.3 and 3.4 at least compile that just fine,
while r0-63127-ga63c0d13291b93a42e927d0356b2d9854c654337 ICEs.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-02-20  7:43 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-93573-4@http.gcc.gnu.org/bugzilla/>
2020-03-20  8:34 ` [Bug c/93573] [8/9/10 Regression] internal compiler error: in force_constant_size, at gimplify.c:733 rguenth at gcc dot gnu.org
2020-03-27 16:40 ` jakub at gcc dot gnu.org
2020-03-27 18:02 ` jakub at gcc dot gnu.org
2020-03-27 18:04 ` jakub at gcc dot gnu.org
2020-03-28  9:31 ` cvs-commit at gcc dot gnu.org
2020-03-28  9:35 ` jakub at gcc dot gnu.org
2020-03-30 23:22 ` joseph at codesourcery dot com
2021-05-14  9:52 ` [Bug c/93573] [9/10/11/12 " jakub at gcc dot gnu.org
2021-06-01  8:16 ` rguenth at gcc dot gnu.org
2022-05-27  9:42 ` [Bug c/93573] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:39 ` jakub at gcc dot gnu.org
2023-07-07 10:36 ` [Bug c/93573] [11/12/13/14 " rguenth at gcc dot gnu.org
2024-02-20  7:36 ` pinskia at gcc dot gnu.org
2024-02-20  7:43 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).