public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/63642] New: Linked List Pointer points to itself (on Mac OS)
@ 2014-10-25 10:42 romain.wallon at orange dot fr
  2014-10-25 10:50 ` [Bug c/63642] " dominiq at lps dot ens.fr
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: romain.wallon at orange dot fr @ 2014-10-25 10:42 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 63642
           Summary: Linked List Pointer points to itself (on Mac OS)
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: romain.wallon at orange dot fr

In a linked list, the pointer to the next element seems to always point to
itself : when the list->next is assigned to null, list is also assigned to
null.

It happens on the gcc version on Mac OSX 10.10


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

* [Bug c/63642] Linked List Pointer points to itself (on Mac OS)
  2014-10-25 10:42 [Bug c/63642] New: Linked List Pointer points to itself (on Mac OS) romain.wallon at orange dot fr
@ 2014-10-25 10:50 ` dominiq at lps dot ens.fr
  2014-10-25 11:52 ` romain.wallon at orange dot fr
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-10-25 10:50 UTC (permalink / raw)
  To: gcc-bugs

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2014-10-25
     Ever confirmed|0                           |1

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Can you post a reproducer?


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

* [Bug c/63642] Linked List Pointer points to itself (on Mac OS)
  2014-10-25 10:42 [Bug c/63642] New: Linked List Pointer points to itself (on Mac OS) romain.wallon at orange dot fr
  2014-10-25 10:50 ` [Bug c/63642] " dominiq at lps dot ens.fr
@ 2014-10-25 11:52 ` romain.wallon at orange dot fr
  2014-10-25 11:53 ` dominiq at lps dot ens.fr
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: romain.wallon at orange dot fr @ 2014-10-25 11:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Romain <romain.wallon at orange dot fr> ---
Created attachment 33807
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33807&action=edit
A test for the bug about linked list

Here is an example of the problem I have encoutered.
It is unfortunately written in french (comments, name of variables), I am
sorry.
I hope it would be helpfull.

Here is the result I had :

Please, enter a monome (for example x) : x
Address of the first element : 0x0
Your polynom : 0

Note 1 : The linked list is used here to represent polynoms. The program itself
is not yet finished, but it works for monoms. 
Note 2 : The program works normally on Ubuntu


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

* [Bug c/63642] Linked List Pointer points to itself (on Mac OS)
  2014-10-25 10:42 [Bug c/63642] New: Linked List Pointer points to itself (on Mac OS) romain.wallon at orange dot fr
  2014-10-25 10:50 ` [Bug c/63642] " dominiq at lps dot ens.fr
  2014-10-25 11:52 ` romain.wallon at orange dot fr
@ 2014-10-25 11:53 ` dominiq at lps dot ens.fr
  2014-10-25 12:19 ` romain.wallon at orange dot fr
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-10-25 11:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
The files for

# include "defpoly.h"
# include "gestpoly.h"

are missing.


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

* [Bug c/63642] Linked List Pointer points to itself (on Mac OS)
  2014-10-25 10:42 [Bug c/63642] New: Linked List Pointer points to itself (on Mac OS) romain.wallon at orange dot fr
                   ` (2 preceding siblings ...)
  2014-10-25 11:53 ` dominiq at lps dot ens.fr
@ 2014-10-25 12:19 ` romain.wallon at orange dot fr
  2014-10-25 12:51 ` dominiq at lps dot ens.fr
  2014-10-26  2:24 ` redi at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: romain.wallon at orange dot fr @ 2014-10-25 12:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Romain <romain.wallon at orange dot fr> ---
Created attachment 33808
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33808&action=edit
The right version

I am sorry, but the file I've attached in my last message was not the right
version.
Here is the right one.


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

* [Bug c/63642] Linked List Pointer points to itself (on Mac OS)
  2014-10-25 10:42 [Bug c/63642] New: Linked List Pointer points to itself (on Mac OS) romain.wallon at orange dot fr
                   ` (3 preceding siblings ...)
  2014-10-25 12:19 ` romain.wallon at orange dot fr
@ 2014-10-25 12:51 ` dominiq at lps dot ens.fr
  2014-10-26  2:24 ` redi at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-10-25 12:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Compiling the "right version" with gcc or clang gives the same result at run
time:

Please, enter a monome (for example x) : x
Address of the first element : 0x0
0

So the problem is likely in your code.

Note that lists are widely used in gcc.


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

* [Bug c/63642] Linked List Pointer points to itself (on Mac OS)
  2014-10-25 10:42 [Bug c/63642] New: Linked List Pointer points to itself (on Mac OS) romain.wallon at orange dot fr
                   ` (4 preceding siblings ...)
  2014-10-25 12:51 ` dominiq at lps dot ens.fr
@ 2014-10-26  2:24 ` redi at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2014-10-26  2:24 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|---                         |INVALID
           Severity|major                       |normal

--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Romain from comment #0)
> It happens on the gcc version on Mac OSX 10.10

That's probably either Clang or Apple's modified GCC 4.2 which is not supported
here


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

end of thread, other threads:[~2014-10-26  1:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-25 10:42 [Bug c/63642] New: Linked List Pointer points to itself (on Mac OS) romain.wallon at orange dot fr
2014-10-25 10:50 ` [Bug c/63642] " dominiq at lps dot ens.fr
2014-10-25 11:52 ` romain.wallon at orange dot fr
2014-10-25 11:53 ` dominiq at lps dot ens.fr
2014-10-25 12:19 ` romain.wallon at orange dot fr
2014-10-25 12:51 ` dominiq at lps dot ens.fr
2014-10-26  2:24 ` redi 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).