public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/36511]  New: ice for legal code with -O2
@ 2008-06-12 17:04 dcb314 at hotmail dot com
  2008-06-13  8:15 ` [Bug tree-optimization/36511] [4.4 Regression] " rguenth at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: dcb314 at hotmail dot com @ 2008-06-12 17:04 UTC (permalink / raw)
  To: gcc-bugs

For the following C++ source code

typedef void * FILE;
FILE *fp;
extern int fprintf (FILE *__restrict __stream, __const char *__restrict
__format, ...);

int
bert(void)
{
 const char * fred = "\n";

 fprintf( fp, "%s", fred);

 return 0;
}

The GNU C++ compiler version 4.4 snapshot 20080606 says

dcb@suselinux:~/gcc/20080606/bugs> ../results/bin/g++ -g -O2 bug14.cc
bug14.cc: In function 'int bert()':
bug14.cc:15: internal compiler error: in set_rhs, at tree-ssa-propagate.c:750
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


-- 
           Summary: ice for legal code with -O2
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dcb314 at hotmail dot com
  GCC host triplet: x86_64-suse-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36511


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

* [Bug tree-optimization/36511] [4.4 Regression] ice for legal code with -O2
  2008-06-12 17:04 [Bug c++/36511] New: ice for legal code with -O2 dcb314 at hotmail dot com
@ 2008-06-13  8:15 ` rguenth at gcc dot gnu dot org
  2008-06-25 12:13 ` rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-06-13  8:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2008-06-13 08:14 -------
Confirmed.  We do not create a EH region in the first place even though
fprintf and fputs could throw.  When CCP folds fputs to fputc it hits
the propagator assert

      if (tree_could_throw_p (new_stmt))
        {
          eh_region = lookup_stmt_eh_region (stmt);
          /* We couldn't possibly turn a nothrow into a throw statement.  */
          gcc_assert (eh_region >= 0);

where /* We couldn't possibly turn a nothrow into a throw statement.  */ is
obviously only true if we'd have created a EH region in the first place.

So either that we didn't is a bug or the assert should be

   gcc_assert (eh_region >= 0 || tree_could_throw_p (stmt));


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|c++                         |tree-optimization
     Ever Confirmed|0                           |1
           Keywords|                            |ice-on-valid-code
      Known to work|                            |4.3.1
   Last reconfirmed|0000-00-00 00:00:00         |2008-06-13 08:14:17
               date|                            |
            Summary|ice for legal code with -O2 |[4.4 Regression] ice for
                   |                            |legal code with -O2
   Target Milestone|---                         |4.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36511


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

* [Bug tree-optimization/36511] [4.4 Regression] ice for legal code with -O2
  2008-06-12 17:04 [Bug c++/36511] New: ice for legal code with -O2 dcb314 at hotmail dot com
  2008-06-13  8:15 ` [Bug tree-optimization/36511] [4.4 Regression] " rguenth at gcc dot gnu dot org
@ 2008-06-25 12:13 ` rguenth at gcc dot gnu dot org
  2008-07-18 20:16 ` rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-06-25 12:13 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36511


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

* [Bug tree-optimization/36511] [4.4 Regression] ice for legal code with -O2
  2008-06-12 17:04 [Bug c++/36511] New: ice for legal code with -O2 dcb314 at hotmail dot com
  2008-06-13  8:15 ` [Bug tree-optimization/36511] [4.4 Regression] " rguenth at gcc dot gnu dot org
  2008-06-25 12:13 ` rguenth at gcc dot gnu dot org
@ 2008-07-18 20:16 ` rguenth at gcc dot gnu dot org
  2008-07-18 20:17 ` rguenth at gcc dot gnu dot org
  2008-09-01 15:48 ` jakub at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-07-18 20:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2008-07-18 20:16 -------
*** Bug 36865 has been marked as a duplicate of this bug. ***


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jhuddleston at hughes dot
                   |                            |net


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36511


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

* [Bug tree-optimization/36511] [4.4 Regression] ice for legal code with -O2
  2008-06-12 17:04 [Bug c++/36511] New: ice for legal code with -O2 dcb314 at hotmail dot com
                   ` (2 preceding siblings ...)
  2008-07-18 20:16 ` rguenth at gcc dot gnu dot org
@ 2008-07-18 20:17 ` rguenth at gcc dot gnu dot org
  2008-09-01 15:48 ` jakub at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-07-18 20:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2008-07-18 20:17 -------
This is "fixed" on the tuples branch.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36511


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

* [Bug tree-optimization/36511] [4.4 Regression] ice for legal code with -O2
  2008-06-12 17:04 [Bug c++/36511] New: ice for legal code with -O2 dcb314 at hotmail dot com
                   ` (3 preceding siblings ...)
  2008-07-18 20:17 ` rguenth at gcc dot gnu dot org
@ 2008-09-01 15:48 ` jakub at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-09-01 15:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jakub at gcc dot gnu dot org  2008-09-01 15:46 -------
Works on the trunk for me.


-- 

jakub at gcc dot gnu dot org changed:

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


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36511


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

end of thread, other threads:[~2008-09-01 15:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-12 17:04 [Bug c++/36511] New: ice for legal code with -O2 dcb314 at hotmail dot com
2008-06-13  8:15 ` [Bug tree-optimization/36511] [4.4 Regression] " rguenth at gcc dot gnu dot org
2008-06-25 12:13 ` rguenth at gcc dot gnu dot org
2008-07-18 20:16 ` rguenth at gcc dot gnu dot org
2008-07-18 20:17 ` rguenth at gcc dot gnu dot org
2008-09-01 15:48 ` jakub at gcc dot gnu dot 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).