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

--- Comment #12 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
I can reproduce it with downloaded Debian's cc1plus, and for me -Wnonnull alone
is sufficient to cause diverging codegen. It diverges very early, in the
frontend: diff of .tu dumps starts with:

--- a/1/16795.cpp.001t.tu
+++ b/2/16795.cpp.001t.tu
@@ -110354,336 +110354,337 @@
 @56158  bind_expr        type: @27      body: @59125
 @56159  cond_expr        type: @27      op 0: @5106    op 1: @59126
                          op 2: @59127
-@56160  cleanup_point_expr type: @27      op 0: @59128
-@56161  convert_expr     type: @27      op 0: @59129
-@56162  call_expr        type: @109     fn  : @59130   0   : @59131
-                         1   : @59132
-@56163  expr_stmt        type: @27      line: 732      expr: @59133
-@56164  cleanup_point_expr type: @109     op 0: @59134
+@56160  cond_expr        type: @27      op 0: @5106    op 1: @59128
+                         op 2: @59129
+@56161  convert_expr     type: @27      op 0: @59130
+@56162  call_expr        type: @109     fn  : @59131   0   : @59132
+                         1   : @59133
+@56163  expr_stmt        type: @27      line: 732      expr: @59134
+@56164  cleanup_point_expr type: @109     op 0: @59135

and .original diff has the following hunk:

@@ -17695,8 +17695,11 @@ return <retval> = __out;
       <<cleanup_point <<< Unknown tree: expr_stmt
   lmi_test::record_error () >>>>>;
     }
-  <<cleanup_point <<< Unknown tree: expr_stmt
+  if (0)
+    {
+      <<cleanup_point <<< Unknown tree: expr_stmt
   lmi_test::record_error () >>>>>;
+    }
 }


(in the diffs, plus-lines correspond to -Wnonnull added to command line)

Reply via email to