public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/111262] New: error: count of bb not initialized with -O3
@ 2023-08-31 20:45 dcb314 at hotmail dot com
  2023-08-31 21:37 ` [Bug tree-optimization/111262] " dcb314 at hotmail dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: dcb314 at hotmail dot com @ 2023-08-31 20:45 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111262
           Summary: error: count of bb not initialized with -O3
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

Created attachment 55829
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55829&action=edit
gzipped C++ source code

For the attached C++ code, with recent gcc trunk and compiler
flag -O3, does this:

foundBugs $ /home/dcb38/gcc/results.20230824.asan.ubsan/bin/gcc -c -w -O3
bug953.cc
foundBugs $ /home/dcb38/gcc/results.20230825.asan.ubsan/bin/gcc -c -w -O3
bug953.cc
In file included from testing/regtest.cc:31:
testing/cmp.h: In static member function ‘static xoff_t
Regtest<Constants>::CmpDifferentBytes(const FileSpec&, const FileSpec&) [with
Constants = SmallBlock]’:
testing/cmp.h:19:15: error: count of bb 188 not initialized
testing/cmp.h:19:15: error: count of bb 189 not initialized
testing/cmp.h:19:15: error: count of bb 190 not initialized
testing/cmp.h:19:15: error: count of bb 191 not initialized
testing/cmp.h:19:15: error: count of bb 193 not initialized
during GIMPLE pass: vect
testing/cmp.h:19:15: internal compiler error: verify_flow_info failed
0xbb35fa verify_flow_info()
        ../../trunk.year/gcc/cfghooks.cc:287
0x11a6aaf checking_verify_flow_info()
        ../../trunk.year/gcc/cfghooks.h:214
0x11a6aaf cleanup_tree_cfg_noloop(unsigned int)
        ../../trunk.year/gcc/tree-cfgcleanup.cc:1154

The bug first seems to start sometime between g:7e05cd632fab4587
and g:449ab115dece8ac8

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

* [Bug tree-optimization/111262] error: count of bb not initialized with -O3
  2023-08-31 20:45 [Bug c++/111262] New: error: count of bb not initialized with -O3 dcb314 at hotmail dot com
@ 2023-08-31 21:37 ` dcb314 at hotmail dot com
  2023-09-01  3:08 ` [Bug tree-optimization/111262] [14 Regression] " pinskia at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dcb314 at hotmail dot com @ 2023-08-31 21:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from David Binderman <dcb314 at hotmail dot com> ---
Reduced C++ code is

struct _Rb_tree_header {
  int _M_node_count;
};
struct _Rb_tree {
  _Rb_tree_header _M_impl;
  bool empty() { return _M_impl._M_node_count; }
};
struct Trans_NS_std_map {
  _Rb_tree _M_t;
  int empty() { return _M_t.empty(); }
};
struct SmallBlock {
  static long BLOCK_SIZE;
};
long BytesOnBlock_blocks, CmpDifferentBytes_total;
int TestFirstByte_rand;
struct Regtest {
  struct FileSpec {
    FileSpec(int *);
    int Blocks_blksize;
    long Blocks() {
      if (table_.empty())
        return 0;
      return Blocks_blksize;
    }
    Trans_NS_std_map table_;
  };
  struct BlockIterator {
    BlockIterator(FileSpec spec)
        : spec_(spec), blksize_(SmallBlock::BLOCK_SIZE) {}
    bool Done() { return blkno_ >= spec_.Blocks(); }
    void Next() { blkno_++; }
    int BytesOnBlock() {
      if (blkno_ == BytesOnBlock_blocks)
        return 1;
      return blksize_;
    }
    FileSpec spec_;
    unsigned long blkno_;
    int blksize_;
  };
  void CmpDifferentBlockBytes();
  void CmpDifferentBytes(FileSpec a) {
    BlockIterator a_i(a);
    CmpDifferentBlockBytes();
    for (; !a_i.Done(); a_i.Next())
      CmpDifferentBytes_total += a_i.BytesOnBlock();
  }
  void TestFirstByte() {
    FileSpec spec0(&TestFirstByte_rand);
    CmpDifferentBytes(spec0);
  }
};
main() {
  Regtest regtest;
  regtest.TestFirstByte();
}

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

* [Bug tree-optimization/111262] [14 Regression] error: count of bb not initialized with -O3
  2023-08-31 20:45 [Bug c++/111262] New: error: count of bb not initialized with -O3 dcb314 at hotmail dot com
  2023-08-31 21:37 ` [Bug tree-optimization/111262] " dcb314 at hotmail dot com
@ 2023-09-01  3:08 ` pinskia at gcc dot gnu.org
  2023-09-01  3:15 ` pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-09-01  3:08 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.0
            Version|unknown                     |14.0
            Summary|error: count of bb not      |[14 Regression] error:
                   |initialized with -O3        |count of bb not initialized
                   |                            |with -O3

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

* [Bug tree-optimization/111262] [14 Regression] error: count of bb not initialized with -O3
  2023-08-31 20:45 [Bug c++/111262] New: error: count of bb not initialized with -O3 dcb314 at hotmail dot com
  2023-08-31 21:37 ` [Bug tree-optimization/111262] " dcb314 at hotmail dot com
  2023-09-01  3:08 ` [Bug tree-optimization/111262] [14 Regression] " pinskia at gcc dot gnu.org
@ 2023-09-01  3:15 ` pinskia at gcc dot gnu.org
  2023-09-01 18:21 ` dcb314 at hotmail dot com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-09-01  3:15 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2023-09-01

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.

;; Scaling loop 3 with scale uninitialized

is new though ...

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

* [Bug tree-optimization/111262] [14 Regression] error: count of bb not initialized with -O3
  2023-08-31 20:45 [Bug c++/111262] New: error: count of bb not initialized with -O3 dcb314 at hotmail dot com
                   ` (2 preceding siblings ...)
  2023-09-01  3:15 ` pinskia at gcc dot gnu.org
@ 2023-09-01 18:21 ` dcb314 at hotmail dot com
  2023-09-01 18:51 ` dcb314 at hotmail dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dcb314 at hotmail dot com @ 2023-09-01 18:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from David Binderman <dcb314 at hotmail dot com> ---
I am trying a bisection. Current range is g:d96659e34cdcf436
to g:603bdf906af6d42c, which is 11 commits.

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

* [Bug tree-optimization/111262] [14 Regression] error: count of bb not initialized with -O3
  2023-08-31 20:45 [Bug c++/111262] New: error: count of bb not initialized with -O3 dcb314 at hotmail dot com
                   ` (3 preceding siblings ...)
  2023-09-01 18:21 ` dcb314 at hotmail dot com
@ 2023-09-01 18:51 ` dcb314 at hotmail dot com
  2023-10-17 12:32 ` rguenth at gcc dot gnu.org
  2023-10-17 13:27 ` dcb314 at hotmail dot com
  6 siblings, 0 replies; 8+ messages in thread
From: dcb314 at hotmail dot com @ 2023-09-01 18:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from David Binderman <dcb314 at hotmail dot com> ---
$ git bisect bad 0c78240fd7d519fc
0c78240fd7d519fc27ca822f66a92f85edf43f70 is the first bad commit
commit 0c78240fd7d519fc27ca822f66a92f85edf43f70
Author: Jan Hubicka <jh@suse.cz>
Date:   Thu Aug 24 15:10:46 2023 +0200

    Check that passes do not forget to define profile

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

* [Bug tree-optimization/111262] [14 Regression] error: count of bb not initialized with -O3
  2023-08-31 20:45 [Bug c++/111262] New: error: count of bb not initialized with -O3 dcb314 at hotmail dot com
                   ` (4 preceding siblings ...)
  2023-09-01 18:51 ` dcb314 at hotmail dot com
@ 2023-10-17 12:32 ` rguenth at gcc dot gnu.org
  2023-10-17 13:27 ` dcb314 at hotmail dot com
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-10-17 12:32 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Neither the reduced nor the unreduced testcase reproduce the issue for me on a
x86_64 host.

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

* [Bug tree-optimization/111262] [14 Regression] error: count of bb not initialized with -O3
  2023-08-31 20:45 [Bug c++/111262] New: error: count of bb not initialized with -O3 dcb314 at hotmail dot com
                   ` (5 preceding siblings ...)
  2023-10-17 12:32 ` rguenth at gcc dot gnu.org
@ 2023-10-17 13:27 ` dcb314 at hotmail dot com
  6 siblings, 0 replies; 8+ messages in thread
From: dcb314 at hotmail dot com @ 2023-10-17 13:27 UTC (permalink / raw)
  To: gcc-bugs

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

David Binderman <dcb314 at hotmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WORKSFORME
             Status|WAITING                     |RESOLVED

--- Comment #6 from David Binderman <dcb314 at hotmail dot com> ---
(In reply to Richard Biener from comment #5)
> Neither the reduced nor the unreduced testcase reproduce the issue for me on
> a x86_64 host.

Agreed. The problem seems to have gone away sometime before date 20230918.

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

end of thread, other threads:[~2023-10-17 13:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-31 20:45 [Bug c++/111262] New: error: count of bb not initialized with -O3 dcb314 at hotmail dot com
2023-08-31 21:37 ` [Bug tree-optimization/111262] " dcb314 at hotmail dot com
2023-09-01  3:08 ` [Bug tree-optimization/111262] [14 Regression] " pinskia at gcc dot gnu.org
2023-09-01  3:15 ` pinskia at gcc dot gnu.org
2023-09-01 18:21 ` dcb314 at hotmail dot com
2023-09-01 18:51 ` dcb314 at hotmail dot com
2023-10-17 12:32 ` rguenth at gcc dot gnu.org
2023-10-17 13:27 ` dcb314 at hotmail dot com

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).