public inbox for ecos-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug 1001934] New: gcc 4.6.3-20120623 optimizes wrong
@ 2014-01-29  9:54 bugzilla-daemon
  2014-02-18 12:45 ` [Bug 1001934] " bugzilla-daemon
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: bugzilla-daemon @ 2014-01-29  9:54 UTC (permalink / raw)
  To: unassigned

Please do not reply to this email, use the link below.

http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001934

            Bug ID: 1001934
           Summary: gcc 4.6.3-20120623 optimizes wrong
           Product: eCos
           Version: CVS
            Target: at91 (Atmel evaluation board (EB40))
  Architecture/Host HostOS: Linux
                OS:
            Status: UNCONFIRMED
          Severity: critical
          Priority: low
         Component: Gnutools
          Assignee: unassigned@bugs.ecos.sourceware.org
          Reporter: J.Lambrecht@televic.com

arm-eabi-gcc (eCos GNU Tools 4.6.3-20120623) 4.6.3 contains a bug: it optimizes
too much in televic-application-code.c (see comment in code):

static TLV_CHAR szConfigVersion[MAX_TOKLEN + 1U];
static TLV_CHAR szConfigArtNr[MAX_TOKLEN + 1U];

TLV_U32 TeLeVic_function(TLV_CHAR *p_String)
{
  TLV_CHAR attribute[MAX_TOKLEN + 1U];
  TLV_CHAR value[MAX_TOKLEN + 1U];
  TLV_S32 s32_valueInt;

  szConfigVersion[0] = 0;
  szConfigArtNr[0] = 0;

...

  if (...)
  {
...
  }
  else
  {
    while (GetAttribute(attribute, &s32_valueInt, value) == TOK_ATTRIBUTE)
    {
      if (strcmp(attribute, "version") == 0)
      {
        strncpy(szConfigVersion, value, sizeof(szConfigVersion));
        szConfigVersion[sizeof(szConfigVersion)] = 0;
/* In this printf szConfigVersion is correct:
     printf("value=%s, szConfigVersion=%s\n", value, szConfigVersion); */
      }
      else if (strcmp(attribute, "artnr") == 0)
      {
        strncpy(szConfigArtNr, value, sizeof(szConfigArtNr));
        szConfigArtNr[sizeof(szConfigArtNr)] = 0;
/* WARNING: in this printf szConfigVersion is 0 with the eabi compiler; with
the
   elf compiler it is OK!!!
     printf("value=%s, szConfigVersion=%s\n", value, szConfigVersion); */
      }

    }
    Enter();
  }
-------------------------------------------
So identically the same code (application+ecos) compiled with arm-elf-gcc (GCC)
3.2.1 (eCosCentric) works fine.
With or without printf's, the result is the same.

-- 
You are receiving this mail because:
You are the assignee for the bug.


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

* [Bug 1001934] gcc 4.6.3-20120623 optimizes wrong
  2014-01-29  9:54 [Bug 1001934] New: gcc 4.6.3-20120623 optimizes wrong bugzilla-daemon
@ 2014-02-18 12:45 ` bugzilla-daemon
  2014-02-19  0:07 ` bugzilla-daemon
  2014-02-26 13:58 ` bugzilla-daemon
  2 siblings, 0 replies; 4+ messages in thread
From: bugzilla-daemon @ 2014-02-18 12:45 UTC (permalink / raw)
  To: unassigned

Please do not reply to this email, use the link below.

http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001934

Juergen Lambrecht <J.Lambrecht@televic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|at91 (Atmel evaluation      |sam9260ek (Atmel
                   |board (EB40))               |AT91SAM9260-EK board)

-- 
You are receiving this mail because:
You are the assignee for the bug.


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

* [Bug 1001934] gcc 4.6.3-20120623 optimizes wrong
  2014-01-29  9:54 [Bug 1001934] New: gcc 4.6.3-20120623 optimizes wrong bugzilla-daemon
  2014-02-18 12:45 ` [Bug 1001934] " bugzilla-daemon
@ 2014-02-19  0:07 ` bugzilla-daemon
  2014-02-26 13:58 ` bugzilla-daemon
  2 siblings, 0 replies; 4+ messages in thread
From: bugzilla-daemon @ 2014-02-19  0:07 UTC (permalink / raw)
  To: unassigned

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

Please do not reply to this email, use the link below.

http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001934

Ilija Kocho [Илија Кочо] <ilijak@siva.com.mk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEEDINFO
                 CC|                            |ilijak@siva.com.mk
     Ever confirmed|0                           |1

--- Comment #1 from Ilija Kocho [Илија Кочо] <ilijak@siva.com.mk> ---
Juergen

Thank you for pointing this out. I recommend you to report this question to GCC
(you can put me or ecos-discuss mailing list or both in CC).

Few questions:

   - What optimizations have you used?
   - How does it beehive witg -O0?
   - Can you try eCos GNU Tools 4.3.2?
   - Can you isolate a test case?

Ilija

-- 
You are receiving this mail because:
You are the assignee for the bug.
>From ecos-bugs-return-10699-listarch-ecos-bugs=sources.redhat.com@sourceware.org Wed Feb 19 07:30:32 2014
Return-Path: <ecos-bugs-return-10699-listarch-ecos-bugs=sources.redhat.com@sourceware.org>
Delivered-To: listarch-ecos-bugs@sources.redhat.com
Received: (qmail 31575 invoked by alias); 19 Feb 2014 07:30:32 -0000
Mailing-List: contact ecos-bugs-help@sourceware.org; run by ezmlm
Precedence: bulk
List-Id: <ecos-bugs.sourceware.org>
List-Subscribe: <mailto:ecos-bugs-subscribe@sourceware.org>
List-Post: <mailto:ecos-bugs@sourceware.org>
List-Help: <mailto:ecos-bugs-help@sourceware.org>, <http://sourceware.org/lists.html#faqs>
Sender: ecos-bugs-owner@sourceware.org
Delivered-To: mailing list ecos-bugs@sourceware.org
Received: (qmail 31562 invoked by uid 89); 19 Feb 2014 07:30:31 -0000
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail.ecoscentric.com
Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197)
 by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 19 Feb 2014 07:30:29 +0000
Received: by mail.ecoscentric.com (Postfix, from userid 48)
	id F16474680002; Wed, 19 Feb 2014 07:30:25 +0000 (GMT)
X-Original-To: unassigned@bugs.ecos.sourceware.org
Delivered-To: unassigned@bugs.ecos.sourceware.org
From: bugzilla-daemon@bugs.ecos.sourceware.org
To: unassigned@bugs.ecos.sourceware.org
Subject: [Bug 1001934] gcc 4.6.3-20120623 optimizes wrong
Date: Wed, 19 Feb 2014 07:30:00 -0000
X-Bugzilla-Reason: AssignedTo
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: eCos
X-Bugzilla-Component: Gnutools
X-Bugzilla-Keywords:
X-Bugzilla-Severity: critical
X-Bugzilla-Who: J.Lambrecht@televic.com
X-Bugzilla-Status: MODIFIED
X-Bugzilla-Priority: low
X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Changed-Fields: bug_status
Message-ID: <bug-1001934-777-poSVI4AO0L@http.bugs.ecos.sourceware.org/>
In-Reply-To: <bug-1001934-777@http.bugs.ecos.sourceware.org/>
References: <bug-1001934-777@http.bugs.ecos.sourceware.org/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://bugs.ecos.sourceware.org/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014/txt/msg00066.txt.bz2
Content-length: 1794

Please do not reply to this email, use the link below.

http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001934

Juergen Lambrecht <J.Lambrecht@televic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |MODIFIED

--- Comment #2 from Juergen Lambrecht <J.Lambrecht@televic.com> ---
(In reply to comment #1)
> Juergen
> 
> Thank you for pointing this out. I recommend you to report this question to
> GCC (you can put me or ecos-discuss mailing list or both in CC).

OK. The eCos toolchain is in my planning for 2014.

> 
> Few questions:
> 
>    - What optimizations have you used?
standard ecos: 
            default_value { CYGBLD_GLOBAL_WARNFLAGS . CYGBLD_ARCH_CFLAGS .
(CYGPKG_INFRA_DEBUG == 1 ? "-O0 " : "-O2 ") . 
                            "-mcpu=arm9tdmi -Winline -g -ffunction-sections
-fdata-sections -fno-rtti -fno-exceptions" }
(I only tested -O2)

application, here the complete command line (omiting all -I):
arm-eabi-gcc -Wall -Wpointer-arith -Wstrict-prototypes -Wundef 
-Wno-write-strings -mno-thumb-interwork -O2 -mcpu=arm9tdmi -Winline -g
-ffunction-sections -fdata-sections  -fno-exceptions -I[......]  -DLINUX -DECOS
-DHAVE_SOCKADDR_SA_LEN -DO_HAVE_CONVERSION -DTRAIN_CFG -c -o
obj/serialconsole.o -MT obj/serialconsole.o -MD -MP -MF
dep/../../../../apps/pr_7315/src/serialconsole.c.d
../../../../apps/pr_7315/src/serialconsole.c

>    - How does it beehive witg -O0?
>    - Can you try eCos GNU Tools 4.3.2?
This I will work on in the coming months

regards,
Jürgen

>    - Can you isolate a test case?
> 
> Ilija

-- 
You are receiving this mail because:
You are the assignee for the bug.
>From ecos-bugs-return-10700-listarch-ecos-bugs=sources.redhat.com@sourceware.org Fri Feb 21 10:23:30 2014
Return-Path: <ecos-bugs-return-10700-listarch-ecos-bugs=sources.redhat.com@sourceware.org>
Delivered-To: listarch-ecos-bugs@sources.redhat.com
Received: (qmail 25963 invoked by alias); 21 Feb 2014 10:23:30 -0000
Mailing-List: contact ecos-bugs-help@sourceware.org; run by ezmlm
Precedence: bulk
List-Id: <ecos-bugs.sourceware.org>
List-Subscribe: <mailto:ecos-bugs-subscribe@sourceware.org>
List-Post: <mailto:ecos-bugs@sourceware.org>
List-Help: <mailto:ecos-bugs-help@sourceware.org>, <http://sourceware.org/lists.html#faqs>
Sender: ecos-bugs-owner@sourceware.org
Delivered-To: mailing list ecos-bugs@sourceware.org
Received: (qmail 25941 invoked by uid 89); 21 Feb 2014 10:23:29 -0000
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_20,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail.ecoscentric.com
Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197)
 by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 21 Feb 2014 10:23:28 +0000
Received: by mail.ecoscentric.com (Postfix, from userid 48)
	id AA81F4680006; Fri, 21 Feb 2014 10:23:25 +0000 (GMT)
X-Original-To: unassigned@bugs.ecos.sourceware.org
Delivered-To: unassigned@bugs.ecos.sourceware.org
From: bugzilla-daemon@bugs.ecos.sourceware.org
To: unassigned@bugs.ecos.sourceware.org
Subject: [Bug 1001947] New: Patch to resolve features depreciated in wx2.8
Date: Fri, 21 Feb 2014 10:23:00 -0000
X-Bugzilla-Reason: AssignedTo
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: eCos
X-Bugzilla-Component: Patches and contributions
X-Bugzilla-Keywords:
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: andy@xylanta.com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: low
X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform
 op_sys bug_status bug_severity priority component assigned_to reporter cc
Message-ID: <bug-1001947-777@http.bugs.ecos.sourceware.org/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://bugs.ecos.sourceware.org/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014/txt/msg00067.txt.bz2
Content-length: 1010

Please do not reply to this email, use the link below.

http://bugs.ecos.sourceware.org/show_bug.cgi?id\x1001947

            Bug ID: 1001947
           Summary: Patch to resolve features depreciated in wx2.8
           Product: eCos
           Version: CVS
            Target: All
  Architecture/Host HostOS: Win XP/7
                OS:
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: low
         Component: Patches and contributions
          Assignee: unassigned@bugs.ecos.sourceware.org
          Reporter: andy@xylanta.com
                CC: ecos-patches@ecos.sourceware.org

Created attachment 2458
  --> http://bugs.ecos.sourceware.org/attachment.cgi?id$58&actioníit
Patch to resolve features depreciated in wx2.8

This patch resolves a number of depreciated feature errors/warnings when
ConfigTool is built using wxWidgets 2.8.12. Tested on Windows but should apply
to all platforms

--
You are receiving this mail because:
You are the assignee for the bug.


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

* [Bug 1001934] gcc 4.6.3-20120623 optimizes wrong
  2014-01-29  9:54 [Bug 1001934] New: gcc 4.6.3-20120623 optimizes wrong bugzilla-daemon
  2014-02-18 12:45 ` [Bug 1001934] " bugzilla-daemon
  2014-02-19  0:07 ` bugzilla-daemon
@ 2014-02-26 13:58 ` bugzilla-daemon
  2 siblings, 0 replies; 4+ messages in thread
From: bugzilla-daemon @ 2014-02-26 13:58 UTC (permalink / raw)
  To: unassigned

Please do not reply to this email, use the link below.

http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001934

Juergen Lambrecht <J.Lambrecht@televic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|MODIFIED                    |RESOLVED
         Resolution|---                         |NOTABUG

--- Comment #3 from Juergen Lambrecht <J.Lambrecht@televic.com> ---
Sorry, this is our bug.
If you have an array, and want to access its sizeof'd byte, then you are 1 byte
too far:
  szConfigVersion[sizeof(szConfigVersion)] = 0;

The code I am reviewing was written by a "quick-and-dirty" type collegue...

-- 
You are receiving this mail because:
You are the assignee for the bug.


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

end of thread, other threads:[~2014-02-26 13:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-29  9:54 [Bug 1001934] New: gcc 4.6.3-20120623 optimizes wrong bugzilla-daemon
2014-02-18 12:45 ` [Bug 1001934] " bugzilla-daemon
2014-02-19  0:07 ` bugzilla-daemon
2014-02-26 13:58 ` bugzilla-daemon

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