public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/91038] ICE with VLA type and statement expression (gimplify_var_or_parm_decl)
       [not found] <bug-91038-4@http.gcc.gnu.org/bugzilla/>
@ 2021-09-05 19:17 ` muecker at gwdg dot de
  2021-11-17 13:30 ` cvs-commit at gcc dot gnu.org
  2023-11-03 19:36 ` uecker at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: muecker at gwdg dot de @ 2021-09-05 19:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Martin Uecker <muecker at gwdg dot de> ---
PATCH:

https://gcc.gnu.org/pipermail/gcc-patches/2021-September/578844.html

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

* [Bug c/91038] ICE with VLA type and statement expression (gimplify_var_or_parm_decl)
       [not found] <bug-91038-4@http.gcc.gnu.org/bugzilla/>
  2021-09-05 19:17 ` [Bug c/91038] ICE with VLA type and statement expression (gimplify_var_or_parm_decl) muecker at gwdg dot de
@ 2021-11-17 13:30 ` cvs-commit at gcc dot gnu.org
  2023-11-03 19:36 ` uecker at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-11-17 13:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Uecker <uecker@gcc.gnu.org>:

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

commit r12-5338-g4e6bf0b9dd5585df1a1472d6a93b9fff72fe2524
Author: Martin Uecker <uecker@gcc.gnu.org>
Date:   Wed Nov 17 14:20:59 2021 +0100

    Fix ICE when mixing VLAs and statement expressions [PR91038]

    When returning VM-types from statement expressions, this can
    lead to an ICE when declarations from the statement expression
    are referred to later. Most of these issues can be addressed by
    gimplifying the base expression earlier in gimplify_compound_lval.
    Another issue is fixed by wrapping the pointer expression in
    pointer_int_sum. This fixes PR91038 and some of the test cases
    from PR29970 (structs with VLA members need further work).

    gcc/
            PR c/91038
            PR c/29970
            * gimplify.c (gimplify_var_or_parm_decl): Update comment.
            (gimplify_compound_lval): Gimplify base expression first.
            (gimplify_target_expr): Add comment.

    gcc/c-family/
            PR c/91038
            PR c/29970
            * c-common.c (pointer_int_sum): Make sure pointer expressions
            are evaluated first when the size expression depends on for
            variably-modified types.

    gcc/testsuite/
            PR c/91038
            PR c/29970
            * gcc.dg/vla-stexp-3.c: New test.
            * gcc.dg/vla-stexp-4.c: New test.
            * gcc.dg/vla-stexp-5.c: New test.
            * gcc.dg/vla-stexp-6.c: New test.
            * gcc.dg/vla-stexp-7.c: New test.
            * gcc.dg/vla-stexp-8.c: New test.
            * gcc.dg/vla-stexp-9.c: New test.

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

* [Bug c/91038] ICE with VLA type and statement expression (gimplify_var_or_parm_decl)
       [not found] <bug-91038-4@http.gcc.gnu.org/bugzilla/>
  2021-09-05 19:17 ` [Bug c/91038] ICE with VLA type and statement expression (gimplify_var_or_parm_decl) muecker at gwdg dot de
  2021-11-17 13:30 ` cvs-commit at gcc dot gnu.org
@ 2023-11-03 19:36 ` uecker at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: uecker at gcc dot gnu.org @ 2023-11-03 19:36 UTC (permalink / raw)
  To: gcc-bugs

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

uecker at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
      Known to fail|                            |10.0
                 CC|                            |uecker at gcc dot gnu.org
   Target Milestone|---                         |12.4
             Status|NEW                         |RESOLVED

--- Comment #5 from uecker at gcc dot gnu.org ---
Fixed.

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

end of thread, other threads:[~2023-11-03 19:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-91038-4@http.gcc.gnu.org/bugzilla/>
2021-09-05 19:17 ` [Bug c/91038] ICE with VLA type and statement expression (gimplify_var_or_parm_decl) muecker at gwdg dot de
2021-11-17 13:30 ` cvs-commit at gcc dot gnu.org
2023-11-03 19:36 ` uecker 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).