public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/66793] ICE at -Os and above on x86_64-linux-gnu (verify_flow_info failed)
       [not found] <bug-66793-4@http.gcc.gnu.org/bugzilla/>
@ 2015-07-08  8:31 ` rguenth at gcc dot gnu.org
  2015-07-08 11:54 ` [Bug ipa/66793] [5 Regression] " rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-07-08  8:31 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 4988 bytes --]

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2015-07-08
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
isolate-paths adds a __builtin_trap but appearantly doesn't split BBs properly:

t.c: In function ‘main’:
t.c:18:1: error: control flow in the middle of basic block 2
 main ()
 ^
fn1 (MEM[(struct S0 *)0B]);
t.c:18:1: internal compiler error: verify_flow_info failed

this is because fn1 is noreturn.
>From gcc-bugs-return-491717-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jul 08 08:35:18 2015
Return-Path: <gcc-bugs-return-491717-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 117757 invoked by alias); 8 Jul 2015 08:35:18 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 117692 invoked by uid 48); 8 Jul 2015 08:35:14 -0000
From: "adam at mizerski dot pl" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/66803] New: std::this_thread::sleep_for gets interrupted by signals.
Date: Wed, 08 Jul 2015 08:35:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 5.1.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: adam at mizerski dot pl
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created
Message-ID: <bug-66803-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-07/txt/msg00607.txt.bz2
Content-length: 2232

https://gcc.gnu.org/bugzilla/show_bug.cgi?idf803

            Bug ID: 66803
           Summary: std::this_thread::sleep_for gets interrupted by
                    signals.
           Product: gcc
           Version: 5.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: adam at mizerski dot pl
  Target Milestone: ---

Created attachment 35930
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id5930&actioníit
preprocessed source

#include <chrono>
#include <iostream>
#include <thread>
#include <csignal>

void signal_handler(int) {}

int main()
{
    using namespace std::chrono_literals;
    std::signal(SIGUSR1, signal_handler);
    const auto start = std::chrono::high_resolution_clock::now();
    std::this_thread::sleep_for(5s);
    const auto end = std::chrono::high_resolution_clock::now();
    std::cout << "Waited " <<
std::chrono::duration_cast<std::chrono::seconds>(end-start).count() << " s\n";
    return 0;
}

Compilation command: g++-5.1 -save-temps -std=c++14 test_cpp.cpp -o test_cpp
-O2 -Wall -Wextra -pedantic -pthread

Preprocessed source in attachment.

Testing command line: ./test_cpp & sleep 2 && kill -USR1 $!

Expected result: std::this_thread::sleep_for(5s); sleeps for 5 seconds.

Actual result: std::this_thread::sleep_for(5s); sleeps for 2 seconds.


The behavior of std::this_thread::sleep_for seems similar to sleep from
unistd.h - it gets interrupted by signal handler. But
std::this_thread::sleep_for unlike sleep has no way to report if it was
interrupted or time left to sleep. C++14 standard (N3797) in 30.3.2 says that
sleep_for should sleep specified amount of time and nothing about any
interrupts.

The same source compiled with "clang++ -std=c++14 -stdlib=libc++ -lc++abi
test_cpp.cpp -o test_cpp -O2" (with clang version 3.5.0) behaves as expected.


$ g++-5.1 -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/5.1.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /usr/src/gcc/configure --disable-multilib
--enable-languages=c,c++
Thread model: posix
gcc version 5.1.0 (GCC)


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

* [Bug ipa/66793] [5 Regression] ICE at -Os and above on x86_64-linux-gnu (verify_flow_info failed)
       [not found] <bug-66793-4@http.gcc.gnu.org/bugzilla/>
  2015-07-08  8:31 ` [Bug ipa/66793] ICE at -Os and above on x86_64-linux-gnu (verify_flow_info failed) rguenth at gcc dot gnu.org
@ 2015-07-08 11:54 ` rguenth at gcc dot gnu.org
  2015-07-08 11:55 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-07-08 11:54 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |6.0
   Target Milestone|---                         |5.2
            Summary|ICE at -Os and above on     |[5 Regression] ICE at -Os
                   |x86_64-linux-gnu            |and above on
                   |(verify_flow_info failed)   |x86_64-linux-gnu
                   |                            |(verify_flow_info failed)

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed on trunk.

The issue is latent on the gcc5 branch (4.9 splits the block in cleanup-cfg).


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

* [Bug ipa/66793] [5 Regression] ICE at -Os and above on x86_64-linux-gnu (verify_flow_info failed)
       [not found] <bug-66793-4@http.gcc.gnu.org/bugzilla/>
  2015-07-08  8:31 ` [Bug ipa/66793] ICE at -Os and above on x86_64-linux-gnu (verify_flow_info failed) rguenth at gcc dot gnu.org
  2015-07-08 11:54 ` [Bug ipa/66793] [5 Regression] " rguenth at gcc dot gnu.org
@ 2015-07-08 11:55 ` rguenth at gcc dot gnu.org
  2015-07-16  9:15 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-07-08 11:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Wed Jul  8 11:54:28 2015
New Revision: 225546

URL: https://gcc.gnu.org/viewcvs?rev=225546&root=gcc&view=rev
Log:
2015-07-08  Richard Biener  <rguenther@suse.de>

        PR tree-optimization/66793
        * gimple-ssa-isolate-paths.c
(insert_trap_and_remove_trailing_statemen):
        Properly split the block after stmts ending it.

        * gcc.dg/torture/pr66793.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.dg/torture/pr66793.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/gimple-ssa-isolate-paths.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug ipa/66793] [5 Regression] ICE at -Os and above on x86_64-linux-gnu (verify_flow_info failed)
       [not found] <bug-66793-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2015-07-08 11:55 ` rguenth at gcc dot gnu.org
@ 2015-07-16  9:15 ` rguenth at gcc dot gnu.org
  2015-09-21  9:56 ` rguenth at gcc dot gnu.org
  2015-09-21  9:57 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-07-16  9:15 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|5.2                         |5.3

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 5.2 is being released, adjusting target milestone to 5.3.


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

* [Bug ipa/66793] [5 Regression] ICE at -Os and above on x86_64-linux-gnu (verify_flow_info failed)
       [not found] <bug-66793-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2015-07-16  9:15 ` rguenth at gcc dot gnu.org
@ 2015-09-21  9:56 ` rguenth at gcc dot gnu.org
  2015-09-21  9:57 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-09-21  9:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Mon Sep 21 09:55:57 2015
New Revision: 227961

URL: https://gcc.gnu.org/viewcvs?rev=227961&root=gcc&view=rev
Log:
2015-09-21  Richard Biener  <rguenther@suse.de>

        Backport from mainline
        2015-07-08  Richard Biener  <rguenther@suse.de>

        PR tree-optimization/66793
        * gimple-ssa-isolate-paths.c
(insert_trap_and_remove_trailing_statemen):
        Properly split the block after stmts ending it.

        * gcc.dg/torture/pr66793.c: New testcase.

        2015-08-05  Richard Biener  <rguenther@suse.de>

        PR tree-optimization/67055
        * tree-ssa-ccp.c (fold_builtin_alloca_with_align): Handle
        NULL gimple_block.

        * g++.dg/torture/pr67055.C: New testcase.

        2015-08-05  Richard Biener  <rguenther@suse.de>

        PR tree-optimization/67121
        * tree-if-conv.c (combine_blocks): Clear range-info produced
        by stmts no longer executed conditionally.

        * gcc.dg/torture/pr67121.c: New testcase.

        2015-09-16  Richard Biener  <rguenther@suse.de>

        PR middle-end/67271
        * fold-const.c (native_encode_expr): Bail out on bogus offsets.

        * gcc.dg/pr67271.c: New testcase.

        2015-07-22  Richard Biener  <rguenther@suse.de>

        PR tree-optimization/66952
        * tree-ssa-ifcombine.c (pass_tree_ifcombine::execute): For
        blocks we end up executing unconditionally reset all SSA
        info such as range and alignment.
        * tree-ssanames.h (reset_flow_sensitive_info): Declare.
        * tree-ssanames.c (reset_flow_sensitive_info): New function.

        * gcc.dg/torture/pr66952.c: New testcase.

        2015-09-15  Richard Biener  <rguenther@suse.de>

        PR tree-optimization/67470
        * tree-ssa-loop-im.c (execute_sm_if_changed): Preserve PHI
        structure for PHI hoisting by inserting a forwarder block
        if appropriate.

        * gcc.dg/torture/pr67470.c: New testcase.

Added:
    branches/gcc-5-branch/gcc/testsuite/g++.dg/torture/pr67055.C
    branches/gcc-5-branch/gcc/testsuite/gcc.dg/pr67271.c
    branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr66793.c
    branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr66952.c
    branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr67121.c
    branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr67470.c
Modified:
    branches/gcc-5-branch/gcc/ChangeLog
    branches/gcc-5-branch/gcc/fold-const.c
    branches/gcc-5-branch/gcc/gimple-ssa-isolate-paths.c
    branches/gcc-5-branch/gcc/testsuite/ChangeLog
    branches/gcc-5-branch/gcc/tree-if-conv.c
    branches/gcc-5-branch/gcc/tree-ssa-ccp.c
    branches/gcc-5-branch/gcc/tree-ssa-ifcombine.c
    branches/gcc-5-branch/gcc/tree-ssa-loop-im.c
    branches/gcc-5-branch/gcc/tree-ssanames.c
    branches/gcc-5-branch/gcc/tree-ssanames.h


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

* [Bug ipa/66793] [5 Regression] ICE at -Os and above on x86_64-linux-gnu (verify_flow_info failed)
       [not found] <bug-66793-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2015-09-21  9:56 ` rguenth at gcc dot gnu.org
@ 2015-09-21  9:57 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-09-21  9:57 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
      Known to fail|                            |5.2.0

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.


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

end of thread, other threads:[~2015-09-21  9:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-66793-4@http.gcc.gnu.org/bugzilla/>
2015-07-08  8:31 ` [Bug ipa/66793] ICE at -Os and above on x86_64-linux-gnu (verify_flow_info failed) rguenth at gcc dot gnu.org
2015-07-08 11:54 ` [Bug ipa/66793] [5 Regression] " rguenth at gcc dot gnu.org
2015-07-08 11:55 ` rguenth at gcc dot gnu.org
2015-07-16  9:15 ` rguenth at gcc dot gnu.org
2015-09-21  9:56 ` rguenth at gcc dot gnu.org
2015-09-21  9:57 ` rguenth 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).