public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/38343]  New: ice for legal code with -O2
@ 2008-12-01 10:01 dcb314 at hotmail dot com
  2008-12-01 10:03 ` [Bug c/38343] " dcb314 at hotmail dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: dcb314 at hotmail dot com @ 2008-12-01 10:01 UTC (permalink / raw)
  To: gcc-bugs

I just tried to compile the Suse Linux package
MyODBC-unixODBC-3.51.26r1127-1.62
with the GNU C compiler version 4.4 snapshot 20081128.

The compiler said

gcc -DHAVE_CONFIG_H -I. -DNONTHREADSAFE -I/usr/include -O3 -DDBUG_OFF
-I/usr/include/mysql -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector
-g -DPIC -fPIC -DUNDEF_HAVE_INITGROUPS -fno-strict-aliasing -O2 -g
-fmessage-length=0 -D_FORTIFY_SOURCE=2 -fno-strict-aliasing -MT
libmyodbc3_la-error.lo -MD -MP -MF .deps/libmyodbc3_la-error.Tpo -c error.c 
-fPIC -DPIC -o .libs/libmyodbc3_la-error.o
In file included from /usr/include/string.h:428,
                 from /usr/include/mysql/m_string.h:30,
                 from ../MYODBC_MYSQL.h:16,
                 from myodbc3.h:37,
                 from error.c:37:
/usr/include/bits/string3.h: In function 'myodbc_sqlstate3_init':
/usr/include/bits/string3.h:113: internal compiler error: in
expand_expr_real_1, at expr.c:9295
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Preprocessed source code attached. Flag -O2 required.


-- 
           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: suse-linux-x86_64


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


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

* [Bug c/38343] ice for legal code with -O2
  2008-12-01 10:01 [Bug c/38343] New: ice for legal code with -O2 dcb314 at hotmail dot com
@ 2008-12-01 10:03 ` dcb314 at hotmail dot com
  2008-12-01 10:43 ` rguenth at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dcb314 at hotmail dot com @ 2008-12-01 10:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from dcb314 at hotmail dot com  2008-12-01 10:01 -------
Created an attachment (id=16799)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16799&action=view)
C source code


-- 


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


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

* [Bug c/38343] ice for legal code with -O2
  2008-12-01 10:01 [Bug c/38343] New: ice for legal code with -O2 dcb314 at hotmail dot com
  2008-12-01 10:03 ` [Bug c/38343] " dcb314 at hotmail dot com
@ 2008-12-01 10:43 ` rguenth at gcc dot gnu dot org
  2008-12-01 10:51 ` [Bug middle-end/38343] [4.4 Regression] " rguenth at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-12-01 10:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2008-12-01 10:42 -------
Reducing.


-- 


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


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

* [Bug middle-end/38343] [4.4 Regression] ice for legal code with -O2
  2008-12-01 10:01 [Bug c/38343] New: ice for legal code with -O2 dcb314 at hotmail dot com
  2008-12-01 10:03 ` [Bug c/38343] " dcb314 at hotmail dot com
  2008-12-01 10:43 ` rguenth at gcc dot gnu dot org
@ 2008-12-01 10:51 ` rguenth at gcc dot gnu dot org
  2008-12-01 17:37 ` jakub at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-12-01 10:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2008-12-01 10:50 -------
typedef struct myodbc3_err_str {
    char sqlstate[6];
} MYODBC3_ERR_STR;
static MYODBC3_ERR_STR myodbc3_errors[] = { { "01000" } };
void myodbc_sqlstate2_init(void)
{
    __builtin_stpcpy(myodbc3_errors[0].sqlstate, "S0022");
}

for internal compiler error: in expand_expr_real_1, at expr.c:9295

typedef struct myodbc3_err_str {
    char sqlstate[6];
} MYODBC3_ERR_STR;
static MYODBC3_ERR_STR myodbc3_errors[] = { { "01000" } };
char *myodbc_sqlstate2_init(void)
{
    return __builtin_stpcpy(myodbc3_errors[0].sqlstate, "S0022");
}

for internal compiler error: in build2_stat, at tree.c:3303

possibly related.  r141893 was ok.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|c                           |middle-end
     Ever Confirmed|0                           |1
           Keywords|                            |ice-on-valid-code
      Known to fail|                            |4.4.0
      Known to work|                            |4.3.2
   Last reconfirmed|0000-00-00 00:00:00         |2008-12-01 10:50:37
               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=38343


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

* [Bug middle-end/38343] [4.4 Regression] ice for legal code with -O2
  2008-12-01 10:01 [Bug c/38343] New: ice for legal code with -O2 dcb314 at hotmail dot com
                   ` (2 preceding siblings ...)
  2008-12-01 10:51 ` [Bug middle-end/38343] [4.4 Regression] " rguenth at gcc dot gnu dot org
@ 2008-12-01 17:37 ` jakub at gcc dot gnu dot org
  2008-12-02 10:15 ` jakub at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-12-01 17:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jakub at gcc dot gnu dot org  2008-12-01 17:35 -------
The bug is in expand_builtin_stpcpy, where it doesn't handle COMPOUND_EXPRs
resulting from build_call_expr as other routines do.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2008-12-01 10:50:37         |2008-12-01 17:35:46
               date|                            |


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


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

* [Bug middle-end/38343] [4.4 Regression] ice for legal code with -O2
  2008-12-01 10:01 [Bug c/38343] New: ice for legal code with -O2 dcb314 at hotmail dot com
                   ` (3 preceding siblings ...)
  2008-12-01 17:37 ` jakub at gcc dot gnu dot org
@ 2008-12-02 10:15 ` jakub at gcc dot gnu dot org
  2008-12-02 10:28 ` jakub at gcc dot gnu dot org
  2008-12-02 17:18 ` jakub at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-12-02 10:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jakub at gcc dot gnu dot org  2008-12-02 10:14 -------
Subject: Bug 38343

Author: jakub
Date: Tue Dec  2 10:13:05 2008
New Revision: 142348

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142348
Log:
        PR middle-end/38343
        * builtins.c (expand_builtin_mempcpy_args): Handle COMPOUND_EXPRs
        potentially returned from folding memcpy.
        (expand_builtin_stpcpy_args): Similarly for folding strcpy.
        (fold_builtin_2): Handle BUILT_IN_STPCPY if result is ignored.

        * gcc.c-torture/compile/pr38343.c: New test.

Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr38343.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/builtins.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug middle-end/38343] [4.4 Regression] ice for legal code with -O2
  2008-12-01 10:01 [Bug c/38343] New: ice for legal code with -O2 dcb314 at hotmail dot com
                   ` (4 preceding siblings ...)
  2008-12-02 10:15 ` jakub at gcc dot gnu dot org
@ 2008-12-02 10:28 ` jakub at gcc dot gnu dot org
  2008-12-02 17:18 ` jakub at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-12-02 10:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jakub at gcc dot gnu dot org  2008-12-02 10:26 -------
Fixed.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug middle-end/38343] [4.4 Regression] ice for legal code with -O2
  2008-12-01 10:01 [Bug c/38343] New: ice for legal code with -O2 dcb314 at hotmail dot com
                   ` (5 preceding siblings ...)
  2008-12-02 10:28 ` jakub at gcc dot gnu dot org
@ 2008-12-02 17:18 ` jakub at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-12-02 17:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jakub at gcc dot gnu dot org  2008-12-02 17:16 -------
Subject: Bug 38343

Author: jakub
Date: Tue Dec  2 17:14:18 2008
New Revision: 142363

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142363
Log:
        PR middle-end/38343
        * builtins.c (fold_builtin_memory_op): Convert len to sizetype
        before using it in POINTER_PLUS_EXPR.

        * gcc.c-torture/compile/pr38343-2.c: New test.

Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr38343-2.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/builtins.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

end of thread, other threads:[~2008-12-02 17:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-01 10:01 [Bug c/38343] New: ice for legal code with -O2 dcb314 at hotmail dot com
2008-12-01 10:03 ` [Bug c/38343] " dcb314 at hotmail dot com
2008-12-01 10:43 ` rguenth at gcc dot gnu dot org
2008-12-01 10:51 ` [Bug middle-end/38343] [4.4 Regression] " rguenth at gcc dot gnu dot org
2008-12-01 17:37 ` jakub at gcc dot gnu dot org
2008-12-02 10:15 ` jakub at gcc dot gnu dot org
2008-12-02 10:28 ` jakub at gcc dot gnu dot org
2008-12-02 17:18 ` 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).