Next year Shirley Temple will reach 80, always a landmark anniversary but even more so in someone who became significant for being little. But the heroine of Little Miss Marker and Rebecca of Sunnybrook Farm receives an unwelcome early present in one of the summer's big art shows: a painting that resurrects the bizarre effect that the Hollywood child star used to have on middle-aged artistic figures.

The Dali & Film show at Tate Modern includes a picture in which the Spanish artist's usually timeless surrealism includes a toxic topicality. His 1939 collage called Shirley Temple, The Youngest, Most Sacred Monster of the Cinema in Her Time imposes the head from a black-and-white newspaper picture of the ringleted movie moppet on the painted body of a heavy-breasted lioness, coloured deep red apart from long white claws. A vampire bat sits on Temple's head, while around her lie the stripped bones from her latest kill. You don't have to look hard for phallic imagery in Dali and the fact that the skeleton of the predator's meal has conveniently broken down into single blunt, curved pieces clearly marks her as a maneater.

This erotic demonisation of an 11-year-old would be startling in any case, but becomes even more so because Salvador Dali's savage anger at the actress was shared by an artistic contemporary in England: the novelist and critic Graham Greene (1904-1991). As the picture of Temple goes on show in London, we are approaching the 70th anniversary of a libel case in which 20th Century Fox sued over a movie review that was a literary equivalent of the case Dali (1904-1989) made in paint.

Writing in the October 1937 edition of the magazine Night and Day, Greene considered the performance of the then nine-year-old Temple in Wee Willie Winkie. The novelist argued that, though marketed as an innocent kid, the performer had a "more secret and more adult appeal" and was, in truth, a "complete totsy" with a "well-developed rump". Although paedophilia was not a term in common use in the 1930s, Greene's meaning is clear when he suggests that, for her male audience, "the safety curtain of story and dialogue drops between their intelligence and their desire".

Because we tend to think of moral panic over the sexualisation of children - by advertisers, clothing manufacturers and the music business - as a modern phenomenon, it's shocking to find these sentiments expressed so strongly seven decades ago. In both portrait and article, the rage expressed seems strangely disproportionate to her performances.

We may wonder, given the artists concerned, if there was an element of self-disgust in these descriptions. Apart from being born in the same year, Greene and Dali were both Roman Catholics (the Spaniard by baptism, the Englishman through conversion) who were rather more interested in sex than their religion, family or society allowed. Did they feel, when they contemplated Temple, the stirring of a deviance beyond even their previous dreams?

It can be argued, though, that Dali and Greene have been vindicated by time. Fox and Temple won the libel case, leading to the closure of Night and Day. The fact that, shortly afterwards, Dali, having seen the child star in The Little Princess, was able to paint his savage portrait with impunity merely confirms that artists are safer from the straitjacket of defamation law than writers. However, the actress, who later became a US diplomat, has subsequently suggested that Greene had a point and that she now realises the studios did impose adult overtones on her costumes, movements and gestures.

Certainly, cinematic history has shown that artist and writer were correct to see something monstrous and improper in the Hollywood child star. Diana Serra Cary - who, as Baby Peggy, was making silent films as a toddler and was the hit kid-actor before Temple - has written about the exploitation and psychological damage suffered by precocious talent in Hollywood, and now, as she approaches her 90th year, campaigns for laws to protect child performers.

Vindications of her position appear daily in tabloid magazines. While Temple and Serra Cary have made sense of their adult lives, the careers of Drew Barrymore and Lindsay Lohan show what a destructive kindergarten young cinematic fame can be. It's easy to imagine, say, Damien Hirst creating a modern companion piece to Dali's Temple, with Lohan as a wrecked sex-kitten lying amid a litter of empty bottles and white lines.

And looking at Dakota Fanning, the nearest thing to a contemporary Temple, you hope that she has watchful parents and agents, although our culture's sensitivity to the depiction of children at least means she is dressed and presented more neutrally in movies than little Shirley ever was. But perhaps, from the millions of dollars she has made, her entourage should buy her the Dali picture as a warning.

comment@theguardian.com