public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/23872] .original dump weirdness
       [not found] <bug-23872-4@http.gcc.gnu.org/bugzilla/>
@ 2024-04-03 20:50 ` pinskia at gcc dot gnu.org
  2024-04-17  0:18 ` pinskia at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-03 20:50 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |pinskia at gcc dot gnu.org

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The <STATEMENT_LIST> issue was fixed with r0-73077-g953ff28998b59b which was
included in GCC 4.2.0.

The DECL_EXPR issue is still there.
Currently the code is:
    case DECL_EXPR:
      print_declaration (pp, DECL_EXPR_DECL (node), spc, flags);
      is_stmt = false;
      break;

I will do a patch to wrap a `DECL_EXPR < ... >` the printing so it becomes
obvious what it does.

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

* [Bug c/23872] .original dump weirdness
       [not found] <bug-23872-4@http.gcc.gnu.org/bugzilla/>
  2024-04-03 20:50 ` [Bug c/23872] .original dump weirdness pinskia at gcc dot gnu.org
@ 2024-04-17  0:18 ` pinskia at gcc dot gnu.org
  2024-04-17  1:39 ` [Bug middle-end/23872] " pinskia at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-17  0:18 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

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

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 86698 has been marked as a duplicate of this bug. ***

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

* [Bug middle-end/23872] .original dump weirdness
       [not found] <bug-23872-4@http.gcc.gnu.org/bugzilla/>
  2024-04-03 20:50 ` [Bug c/23872] .original dump weirdness pinskia at gcc dot gnu.org
  2024-04-17  0:18 ` pinskia at gcc dot gnu.org
@ 2024-04-17  1:39 ` pinskia at gcc dot gnu.org
  2024-04-17  1:40 ` pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-17  1:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
With the example in PR 86698 with the patches I will be posting, gcc now does:
```
;; Function f (null)
;; enabled by -tree-original


{
  int x = z++ , y;

  DECL_EXPR<int x>;
  return x;
}

```

I am still deciding if we want to print out the DECL_INIT for the DECL_EXPR or
not. But this seems like a reasonible output so far.

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

* [Bug middle-end/23872] .original dump weirdness
       [not found] <bug-23872-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2024-04-17  1:39 ` [Bug middle-end/23872] " pinskia at gcc dot gnu.org
@ 2024-04-17  1:40 ` pinskia at gcc dot gnu.org
  2024-04-17  5:59 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-17  1:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #7)
> With the example in PR 86698 with the patches I will be posting, gcc now
> does:
> ```
> ;; Function f (null)
> ;; enabled by -tree-original
> 
> 
> {
>   int x = z++ , y;
> 
>   DECL_EXPR<int x>;
>   return x;
> }
> 
> ```
> 
> I am still deciding if we want to print out the DECL_INIT for the DECL_EXPR
> or not. But this seems like a reasonible output so far.

Oh there is still some confusion around the printing of the DECL_INIT for the
decl. Let me fix that ...

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

* [Bug middle-end/23872] .original dump weirdness
       [not found] <bug-23872-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2024-04-17  1:40 ` pinskia at gcc dot gnu.org
@ 2024-04-17  5:59 ` pinskia at gcc dot gnu.org
  2024-05-02 21:40 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-17  5:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Created attachment 57968
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57968&action=edit
Patch set that I will be submitting once GCC 15 opens up

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

* [Bug middle-end/23872] .original dump weirdness
       [not found] <bug-23872-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2024-04-17  5:59 ` pinskia at gcc dot gnu.org
@ 2024-05-02 21:40 ` pinskia at gcc dot gnu.org
  2024-05-03 22:07 ` cvs-commit at gcc dot gnu.org
  2024-05-03 22:13 ` pinskia at gcc dot gnu.org
  7 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-05-02 21:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Patches submitted:
https://gcc.gnu.org/pipermail/gcc-patches/2024-May/650586.html
https://gcc.gnu.org/pipermail/gcc-patches/2024-May/650587.html
https://gcc.gnu.org/pipermail/gcc-patches/2024-May/650585.html

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

* [Bug middle-end/23872] .original dump weirdness
       [not found] <bug-23872-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2024-05-02 21:40 ` pinskia at gcc dot gnu.org
@ 2024-05-03 22:07 ` cvs-commit at gcc dot gnu.org
  2024-05-03 22:13 ` pinskia at gcc dot gnu.org
  7 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-05-03 22:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pinskia@gcc.gnu.org>:

https://gcc.gnu.org/g:04f24e44fb14a22516444f70503719f3fda15d6c

commit r15-139-g04f24e44fb14a22516444f70503719f3fda15d6c
Author: Andrew Pinski <quic_apinski@quicinc.com>
Date:   Tue Apr 16 17:43:36 2024 -0700

    Fix printing COMPOUND_EXPR in .original [PR23872]

    Starting with the merge of the openmp branch into the trunk
    (r0-73077-g953ff28998b59b), COMPOUND_EXPR started to be printed
    as `expr; , expr` which is wrong. This was due to the wrong
    conversion of dumping_stmts into `!(flags & TDF_SLIM)`. That is wrong
    as we are not dumping stmts at this point (`!(flags & TDF_SLIM)` was always
    true for this case as TDF_SLIM case was handled before hand). So switch it
    to be always false.

    Bootstrapped and tested on x86_64-linux-gnu with no regressions.

    gcc/ChangeLog:

            PR middle-end/23872
            * tree-pretty-print.cc (dump_generic_node <case COMPOUND_EXPR>):
Fix
            calls to dump_generic_node and also remove unreachable code that is
testing
            `flags & TDF_SLIM`.

    gcc/testsuite/ChangeLog:

            * gfortran.dg/gomp/atomic-21.f90: Update testcase for the removal
of `;`.

    Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>

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

* [Bug middle-end/23872] .original dump weirdness
       [not found] <bug-23872-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2024-05-03 22:07 ` cvs-commit at gcc dot gnu.org
@ 2024-05-03 22:13 ` pinskia at gcc dot gnu.org
  7 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-05-03 22:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note only the `;` issue has been resolved, the other 2 issues I have to rework.

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

end of thread, other threads:[~2024-05-03 22:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-23872-4@http.gcc.gnu.org/bugzilla/>
2024-04-03 20:50 ` [Bug c/23872] .original dump weirdness pinskia at gcc dot gnu.org
2024-04-17  0:18 ` pinskia at gcc dot gnu.org
2024-04-17  1:39 ` [Bug middle-end/23872] " pinskia at gcc dot gnu.org
2024-04-17  1:40 ` pinskia at gcc dot gnu.org
2024-04-17  5:59 ` pinskia at gcc dot gnu.org
2024-05-02 21:40 ` pinskia at gcc dot gnu.org
2024-05-03 22:07 ` cvs-commit at gcc dot gnu.org
2024-05-03 22:13 ` pinskia 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).